summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-02-17 10:42:56 -0500
committerNick Mathewson <nickm@torproject.org>2012-02-17 10:42:59 -0500
commit65bc91c210b75ae924111919eee56ec54ecd27ee (patch)
treef3b6b7c3f5ae30fa2d4b0fbbece7362dd49c5a8d
parent819e98ac7da8ab69ff68b154caaf747aa8ecc4cc (diff)
downloadlibevent-65bc91c210b75ae924111919eee56ec54ecd27ee.tar.gz
Fix an "unused return value" warning on write() in signal handler
-rw-r--r--signal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/signal.c b/signal.c
index 5d73ea80..e279f5e8 100644
--- 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