about summary refs log tree commit diff
path: root/sysdeps/pthread/tst-timer.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 /sysdeps/pthread/tst-timer.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 'sysdeps/pthread/tst-timer.c')
-rw-r--r--sysdeps/pthread/tst-timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/pthread/tst-timer.c b/sysdeps/pthread/tst-timer.c
index 47472ab8e1..4cfe0b67dc 100644
--- a/sysdeps/pthread/tst-timer.c
+++ b/sysdeps/pthread/tst-timer.c
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <stdint.h>
 
+#include <support/xunistd.h>
 
 static void
 notify_func1 (union sigval sigval)
@@ -44,7 +45,7 @@ signal_func (int sig)
 {
   static const char text[] = "signal_func\n";
   signal (sig, signal_func);
-  write (STDOUT_FILENO, text, sizeof text - 1);
+  xwrite (STDOUT_FILENO, text, sizeof text - 1);
 }
 
 static void