From a255fb20ae8cd41dfd3d88c9e8dd9b503aaf6f7f Mon Sep 17 00:00:00 2001 From: Robert Edmonds Date: Sat, 8 Jul 2023 23:27:45 -0400 Subject: [PATCH] test-generated-code2: Ignore -Wdeclaration-after-statement This file uses declarations after statements and fixing it would make the code less readable, so silence this particular diagnostic in this particular file. --- t/generated-code2/test-generated-code2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/generated-code2/test-generated-code2.c b/t/generated-code2/test-generated-code2.c index 5198af6..e29f15d 100755 --- a/t/generated-code2/test-generated-code2.c +++ b/t/generated-code2/test-generated-code2.c @@ -5,6 +5,9 @@ #include "t/test-optimized.pb-c.h" #include "t/generated-code2/test-full-cxx-output.inc" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeclaration-after-statement" + #define TEST_ENUM_SMALL_TYPE_NAME Foo__TestEnumSmall #define TEST_ENUM_SMALL(shortname) FOO__TEST_ENUM_SMALL__##shortname #define TEST_ENUM_TYPE_NAME Foo__TestEnum