]> granicus.if.org Git - libevent/commitdiff
Fix an "unused return value" warning on write() in signal handler
authorNick Mathewson <nickm@torproject.org>
Fri, 17 Feb 2012 15:42:56 +0000 (10:42 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 17 Feb 2012 15:42:59 +0000 (10:42 -0500)
signal.c

index 5d73ea80c5d655e4283715fc689d4b9e43e25a15..e279f5e81d9f295d15a8176b8ed59cb536de18da 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -397,7 +397,10 @@ evsig_handler(int sig)
 #ifdef _WIN32
        send(evsig_base_fd, (char*)&msg, 1, 0);
 #else
-       write(evsig_base_fd, (char*)&msg, 1);
+       {
+               int r = write(evsig_base_fd, (char*)&msg, 1);
+               (void)r; /* Suppress 'unused return value' and 'unused var' */
+       }
 #endif
        errno = save_errno;
 #ifdef _WIN32