diff options
author | Christophe Grenier <[email protected]> | 2024-06-08 09:50:02 +0200 |
---|---|---|
committer | Christophe Grenier <[email protected]> | 2024-06-08 09:50:02 +0200 |
commit | 63d275a8b072a9ff41000a9a3135ef54dee984f3 (patch) | |
tree | ac6397ff7b4fce3c69f1019b00af57a028ddec22 | |
parent | c5f76352d90025ca49aa03e4774984f5fdafaee8 (diff) |
src/file_exe.c: Add loop variant so Frama-C can proves that functions
terminates
-rw-r--r-- | src/file_exe.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/file_exe.c b/src/file_exe.c index b979668b..1e00dd54 100644 --- a/src/file_exe.c +++ b/src/file_exe.c @@ -451,6 +451,9 @@ static void pe_resource_language(FILE *file, const unsigned int base, const unsi #if defined(__FRAMAC__) Frama_C_make_unknown((char *)rsrc_entries, count * sizeof(struct rsrc_entries_s)); #endif + /*@ + @ loop variant count - i; + @*/ for(i=0; i<count; i++) { const struct rsrc_entries_s *rsrc_entry=&rsrc_entries[i]; @@ -512,6 +515,9 @@ static void pe_resource_id(FILE *file, const unsigned int base, const unsigned i #if defined(__FRAMAC__) Frama_C_make_unknown((char *)rsrc_entries, count * sizeof(struct rsrc_entries_s)); #endif + /*@ + @ loop variant count - i; + @*/ for(i=0; i<count; i++) { const struct rsrc_entries_s *rsrc_entry=&rsrc_entries[i]; @@ -582,6 +588,9 @@ static void pe_resource_type(FILE *file, const unsigned int base, const unsigned #if defined(__FRAMAC__) Frama_C_make_unknown((char *)rsrc_entries, count * sizeof(struct rsrc_entries_s)); #endif + /*@ + @ loop variant count - i; + @*/ for(i=0; i<count; i++) { const struct rsrc_entries_s *rsrc_entry=&rsrc_entries[i]; |