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>
This commit is contained in:
Frédéric Bérat 2023-04-28 14:21:33 +02:00 committed by Siddhesh Poyarekar
parent a961e16ff6
commit 7aec73c406

View File

@ -31,10 +31,12 @@ eintr_handler (int sig)
{ {
if (sig != the_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); _exit (1);
} }
write (STDOUT_FILENO, ".", 1); if (write (STDOUT_FILENO, ".", 1)) {/* Avoid warn unused result */};
} }