]> granicus.if.org Git - sudo/commitdiff
Quiet gcc warnings on glibc systems that use warn_unused_result for
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 11 Sep 2010 13:26:09 +0000 (09:26 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 11 Sep 2010 13:26:09 +0000 (09:26 -0400)
write(2).

src/exec.c

index 11b078df0366102e25e5b3685bb0a1529e713c8e..a000e5ac04eb65e606f8a93daf338c2a243cd00f 100644 (file)
@@ -468,7 +468,8 @@ handler(int 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 */;
 }
 
 /*