From: Peter Hutterer Date: Thu, 22 Aug 2013 23:04:01 +0000 (+1000) Subject: test: fix the gcc diagnostics pragma X-Git-Tag: xorg-server-1.14.99.2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d803f296c616ccf55711cf0af9e7d3eae2edda16;p=platform%2Fupstream%2Fxorg-server.git test: fix the gcc diagnostics pragma pop without push restores the commandline options. The proper way is to push, then ignore, then pop. And while we're at it, change the pop argument to a comment - pop ignores the argument, but be proper about it. Signed-off-by: Peter Hutterer --- diff --git a/test/signal-logging.c b/test/signal-logging.c index f6bc85c..a03c5ac 100644 --- a/test/signal-logging.c +++ b/test/signal-logging.c @@ -150,6 +150,7 @@ number_formatting(void) assert(check_float_format_test(float_tests[i])); } +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-security" static void logging_format(void) { @@ -378,7 +379,7 @@ static void logging_format(void) #undef read_log_msg } -#pragma GCC diagnostic pop "-Wformat-security" +#pragma GCC diagnostic pop /* "-Wformat-security" */ int main(int argc, char **argv)