diff options
author | Frédéric Bérat <fberat@redhat.com> | 2023-04-28 14:21:33 +0200 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2023-05-24 21:52:31 -0400 |
commit | 7aec73c40691b7dfa48d22941ff72238aebe82eb (patch) | |
tree | 5733ac0c6c3a4d2bf9acf3f0d06db07edacf814c | |
parent | a961e16ff67e62b26e23d43f323c718ffcf84e1e (diff) | |
download | glibc-7aec73c40691b7dfa48d22941ff72238aebe82eb.zip glibc-7aec73c40691b7dfa48d22941ff72238aebe82eb.tar.gz glibc-7aec73c40691b7dfa48d22941ff72238aebe82eb.tar.bz2 |
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>
-rw-r--r-- | sysdeps/pthread/eintr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/pthread/eintr.c b/sysdeps/pthread/eintr.c index 000649d..1619139 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 */}; } |