From d54fb0cbb9442a62c0fc657559bb7785058a909f Mon Sep 17 00:00:00 2001 From: engboris Date: Wed, 12 Jun 2024 17:52:34 +0200 Subject: [PATCH] Fix --- cobc/codegen.c | 8 ++++---- cobc/scanner.l | 2 -- tests/testsuite.src/used_binaries.at | 8 +------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/cobc/codegen.c b/cobc/codegen.c index 30a9e7c4f..d2f9c4b7e 100644 --- a/cobc/codegen.c +++ b/cobc/codegen.c @@ -1841,15 +1841,15 @@ output_gnucobol_defines (const char *formatted_date) l = cb_include_file_list_directive; while (l) { - struct cb_text_list *last = l; + struct cb_text_list *last = l; if (l->text[0] == '<') { output_line ("#include %s", l->text); } else { output_line ("#include \"%s\"", l->text); } - l = l->next; - cobc_free (last->text); - cobc_free (last); + l = l->next; + cobc_free (last->text); + cobc_free (last); } } } diff --git a/cobc/scanner.l b/cobc/scanner.l index 16b0c2e59..034ac42b6 100644 --- a/cobc/scanner.l +++ b/cobc/scanner.l @@ -2798,5 +2798,3 @@ cb_find_defined_program_by_id (const char *orig_id) return NULL; } - - diff --git a/tests/testsuite.src/used_binaries.at b/tests/testsuite.src/used_binaries.at index 72f144e02..da589f1af 100644 --- a/tests/testsuite.src/used_binaries.at +++ b/tests/testsuite.src/used_binaries.at @@ -1083,7 +1083,7 @@ AT_CLEANUP AT_SETUP([check include header file]) -#AT_KEYWORDS([include]) +#AT_KEYWORDS([include imp]) AT_DATA([file.h], [ COB_EXT_IMPORT void f (char *, long); @@ -1138,12 +1138,6 @@ AT_CHECK([$COMPILE_MODULE -Wno-unfinished --copy "f.copy" -fstatic-call prog2.co [prog2.cob:8: warning: unexpected RETURNING item ]) -AT_CLEANUP - - -AT_SETUP([check include header file with directive]) -#AT_KEYWORDS([imp include]) - AT_DATA([file.h], [ COB_EXT_IMPORT void f (char *, long); ])