public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] sysdeps/pthread/eintr.c: fix warn unused result
@ 2023-05-25 1:54 Siddhesh Poyarekar
0 siblings, 0 replies; only message in thread
From: Siddhesh Poyarekar @ 2023-05-25 1:54 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7aec73c40691b7dfa48d22941ff72238aebe82eb
commit 7aec73c40691b7dfa48d22941ff72238aebe82eb
Author: Frédéric Bérat <fberat@redhat.com>
Date: Fri Apr 28 14:21:33 2023 +0200
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>
Diff:
---
sysdeps/pthread/eintr.c | 6 ++++--
1 file 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 */};
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-25 1:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-25 1:54 [glibc] sysdeps/pthread/eintr.c: fix warn unused result Siddhesh Poyarekar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).