diff options
-rw-r--r-- | nptl/tst-thread-setspecific.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/nptl/tst-thread-setspecific.c b/nptl/tst-thread-setspecific.c index 8f25c6f..bdfa583 100644 --- a/nptl/tst-thread-setspecific.c +++ b/nptl/tst-thread-setspecific.c @@ -19,15 +19,17 @@ #include <pthread.h> #include <stdlib.h> +#include <libc-diag.h> /* Turn uninitialized warnings into errors to detect the problem. See BZ #27714. */ -#pragma GCC diagnostic push -#pragma GCC diagnostic error "-Wmaybe-uninitialized" -#pragma GCC diagnostic error "-Wuninitialized" +DIAG_PUSH_NEEDS_COMMENT; +DIAG_IGNORE_NEEDS_COMMENT (6, "-Wmaybe-uninitialized"); +DIAG_IGNORE_NEEDS_COMMENT (6, "-Wuninitialized"); -int do_test (void) +static int +do_test (void) { void *p = malloc (1); /* Deliberately uninitialized. */ pthread_setspecific (pthread_self (), p); @@ -37,7 +39,6 @@ int do_test (void) return p == q; } -#pragma GCC diagnostic pop +DIAG_POP_NEEDS_COMMENT; -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include <support/test-driver.c> |