From d5b38790950533e80d1fc7c79cab4eacef626547 Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Sun, 30 Oct 2016 23:51:27 -0200 Subject: Use write_message instead of write In the test cases, there are writes to stdout which do not check the result value. This patch replaces such occurrences with calls to write_message, which properly deals with the unused result. Tested for powerpc64le. --- nptl/tst-tls2.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'nptl/tst-tls2.c') diff --git a/nptl/tst-tls2.c b/nptl/tst-tls2.c index eb6d8a336b..054ab80172 100644 --- a/nptl/tst-tls2.c +++ b/nptl/tst-tls2.c @@ -29,13 +29,18 @@ static pthread_t th[N]; +static int do_test (void); + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" + #define CB(n) \ static void \ cb##n (void) \ { \ if (th[n] != pthread_self ()) \ { \ - write (STDOUT_FILENO, "wrong callback\n", 15); \ + write_message ("wrong callback\n"); \ _exit (1); \ } \ } @@ -67,7 +72,7 @@ handler (int sig) { if (sig != THE_SIG) { - write (STDOUT_FILENO, "wrong signal\n", 13); + write_message ("wrong signal\n"); _exit (1); } @@ -75,7 +80,7 @@ handler (int sig) if (sem_post (&s) != 0) { - write (STDOUT_FILENO, "sem_post failed\n", 16); + write_message ("sem_post failed\n"); _exit (1); } } @@ -199,7 +204,3 @@ do_test (void) return 0; } - - -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" -- cgit v1.2.3