From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id ECB993857C50; Thu, 31 Mar 2022 12:12:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECB993857C50 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] nptl: Use libc-diag.h with tst-thread-setspecific X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/master X-Git-Oldrev: 1dedc5bd5cc43173e0f7d7e010398ff46139e1dd X-Git-Newrev: 692c2571c8b2b707704661bf1cfd2de3b3ab8cff Message-Id: <20220331121203.ECB993857C50@sourceware.org> Date: Thu, 31 Mar 2022 12:12:03 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2022 12:12:04 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=692c2571c8b2b707704661bf1cfd2de3b3ab8cff commit 692c2571c8b2b707704661bf1cfd2de3b3ab8cff Author: Adhemerval Zanella Date: Fri Mar 25 09:01:48 2022 -0300 nptl: Use libc-diag.h with tst-thread-setspecific And also use libsupport. Checked on x86_64-linux-gnu and i686-linux-gnu. Diff: --- nptl/tst-thread-setspecific.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/nptl/tst-thread-setspecific.c b/nptl/tst-thread-setspecific.c index 8f25c6f7ce..bdfa583efc 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