about summary refs log tree commit diff
path: root/nptl/tst-tls3mod.c
diff options
context:
space:
mode:
authorFrédéric Bérat <fberat@redhat.com>2023-06-01 12:40:05 -0400
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2023-06-01 12:40:05 -0400
commit026a84a54d3b6c23b999b793e2a6f8ecd211e3b8 (patch)
treea2d31c6c98b1de645aee08e9f8d907ec1961bd7d /nptl/tst-tls3mod.c
parenta8c888997845c5192e446176374c2e13bb3e2195 (diff)
downloadglibc-026a84a54d3b6c23b999b793e2a6f8ecd211e3b8.tar.gz
glibc-026a84a54d3b6c23b999b793e2a6f8ecd211e3b8.tar.xz
glibc-026a84a54d3b6c23b999b793e2a6f8ecd211e3b8.zip
tests: replace write by xwrite
Using write without cheks leads to warn unused result when __wur is
enabled.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'nptl/tst-tls3mod.c')
-rw-r--r--nptl/tst-tls3mod.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/tst-tls3mod.c b/nptl/tst-tls3mod.c
index c6e8910b1e..345a48e1c7 100644
--- a/nptl/tst-tls3mod.c
+++ b/nptl/tst-tls3mod.c
@@ -25,6 +25,7 @@
 #include <pthreaddef.h>
 #include <descr.h>
 
+#include <support/xunistd.h>
 
 extern pthread_barrier_t b;
 
@@ -43,7 +44,7 @@ handler (int sig)
 {
   if (sig != THE_SIG)
     {
-      write (STDOUT_FILENO, "wrong signal\n", 13);
+      xwrite (STDOUT_FILENO, "wrong signal\n", 13);
       _exit (1);
     }
 
@@ -51,7 +52,7 @@ handler (int sig)
 
   if (sem_post (&s) != 0)
     {
-      write (STDOUT_FILENO, "sem_post failed\n", 16);
+      xwrite (STDOUT_FILENO, "sem_post failed\n", 16);
       _exit (1);
     }
 }