public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] nptl: Use libc-diag.h with tst-thread-setspecific Date: Thu, 31 Mar 2022 12:12:03 +0000 (GMT) [thread overview] Message-ID: <20220331121203.ECB993857C50@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=692c2571c8b2b707704661bf1cfd2de3b3ab8cff commit 692c2571c8b2b707704661bf1cfd2de3b3ab8cff Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> 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 <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>
reply other threads:[~2022-03-31 12:12 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220331121203.ECB993857C50@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).