From: Adhemerval Zanella Date: Fri, 25 Mar 2022 12:01:48 +0000 (-0300) Subject: nptl: Use libc-diag.h with tst-thread-setspecific X-Git-Tag: glibc-2.36~417 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=692c2571c8b2b707704661bf1cfd2de3b3ab8cff;p=thirdparty%2Fglibc.git nptl: Use libc-diag.h with tst-thread-setspecific And also use libsupport. Checked on x86_64-linux-gnu and i686-linux-gnu. --- diff --git a/nptl/tst-thread-setspecific.c b/nptl/tst-thread-setspecific.c index 8f25c6f7ce3..bdfa583efcc 100644 --- a/nptl/tst-thread-setspecific.c +++ b/nptl/tst-thread-setspecific.c @@ -19,15 +19,17 @@ #include #include +#include /* 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