about summary refs log tree commit diff
path: root/sysdeps/pthread
diff options
context:
space:
mode:
authorFrédéric Bérat <fberat@redhat.com>2023-04-28 14:21:33 +0200
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2023-05-24 21:52:31 -0400
commit7aec73c40691b7dfa48d22941ff72238aebe82eb (patch)
tree5733ac0c6c3a4d2bf9acf3f0d06db07edacf814c /sysdeps/pthread
parenta961e16ff67e62b26e23d43f323c718ffcf84e1e (diff)
downloadglibc-7aec73c40691b7dfa48d22941ff72238aebe82eb.tar.gz
glibc-7aec73c40691b7dfa48d22941ff72238aebe82eb.tar.xz
glibc-7aec73c40691b7dfa48d22941ff72238aebe82eb.zip
sysdeps/pthread/eintr.c: fix warn unused result
Fix unused result warnings, detected when _FORTIFY_SOURCE is enabled in
glibc.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps/pthread')
-rw-r--r--sysdeps/pthread/eintr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/pthread/eintr.c b/sysdeps/pthread/eintr.c
index 000649d24e..16191395a7 100644
--- a/sysdeps/pthread/eintr.c
+++ b/sysdeps/pthread/eintr.c
@@ -31,10 +31,12 @@ eintr_handler (int sig)
 {
   if (sig != the_sig)
     {
-      write (STDOUT_FILENO, "eintr_handler: signal number wrong\n", 35);
+      /* empty if statement avoids warn unused result */
+      if (write (STDOUT_FILENO,
+		 "eintr_handler: signal number wrong\n", 35) < 35) {};
       _exit (1);
     }
-  write (STDOUT_FILENO, ".", 1);
+  if (write (STDOUT_FILENO, ".", 1)) {/* Avoid warn unused result */};
 }