public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] nptl: Use libc-diag.h with tst-thread-setspecific
@ 2022-03-31 12:12 Adhemerval Zanella
0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2022-03-31 12:12 UTC (permalink / raw)
To: glibc-cvs
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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-31 12:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 12:12 [glibc] nptl: Use libc-diag.h with tst-thread-setspecific Adhemerval Zanella
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).