From: Todd C. Miller Date: Sat, 11 Sep 2010 13:26:20 +0000 (-0400) Subject: Quiet gcc warnings on glibc systems that use warn_unused_result for X-Git-Tag: SUDO_1_7_5~162 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9807c972afc28abd414562fac82032f2eced3a5f;p=sudo Quiet gcc warnings on glibc systems that use warn_unused_result for write(2). --HG-- branch : 1.7 --- diff --git a/exec.c b/exec.c index 86bb7fb8f..d575a936b 100644 --- a/exec.c +++ b/exec.c @@ -524,7 +524,8 @@ handler(s) * The pipe is non-blocking, if we overflow the kernel's pipe * buffer we drop the signal. This is not a problem in practice. */ - (void)write(signal_pipe[1], &signo, sizeof(signo)); + if (write(signal_pipe[1], &signo, sizeof(signo)) == -1) + /* shut up glibc */; } /*