diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-08-29 09:11:35 +1000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-08-29 01:11:29 -0700 |
commit | 148583d62b84832369e9df39b3e527b99ca96761 (patch) | |
tree | cf6af0967c62d638fae1e4a61a2bad6ff20d72f2 /test | |
parent | 486038fe16957b39d39842365c5409c494c9a8df (diff) |
tests: move GCC diagnostics pragma outside of function
This is a a gcc 4.6+ feature.
signal-logging.c:210: error: #pragma GCC diagnostic not allowed inside
functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/signal-logging.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/signal-logging.c b/test/signal-logging.c index 3206ddefa..810bd20ed 100644 --- a/test/signal-logging.c +++ b/test/signal-logging.c @@ -178,6 +178,7 @@ number_formatting(void) assert(check_signed_number_format_test(signed_tests + i)); } +#pragma GCC diagnostic ignored "-Wformat-security" static void logging_format(void) { const char *log_file_path = "/tmp/Xorg-logging-test.log"; @@ -207,9 +208,7 @@ static void logging_format(void) assert(strcmp(logmsg, "(EE) test message\n") == 0); /* long buf is truncated to "....en\n" */ -#pragma GCC diagnostic ignored "-Wformat-security" LogMessageVerbSigSafe(X_ERROR, -1, buf); -#pragma GCC diagnostic pop "-Wformat-security" read_log_msg(logmsg); assert(strcmp(&logmsg[strlen(logmsg) - 3], "en\n") == 0); @@ -298,6 +297,7 @@ static void logging_format(void) #undef read_log_msg } +#pragma GCC diagnostic pop "-Wformat-security" int main(int argc, char **argv) |