Fix -Wunused-but-set-variable compiler warnings in tevent_signal.c
authorMartin Schwenke <martin@meltin.net>
Wed, 9 Nov 2011 23:46:10 +0000 (10:46 +1100)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 Nov 2011 09:28:44 +0000 (10:28 +0100)
commit538748132fbf6bcc1ce0bbd474e4abf3ecdabffa
treee8c2f42d36bdbed2431a5a67d98e9e0a56f6ba62
parent7d84805ac06522dabeb4f8d5b69dab2918a508ba
Fix -Wunused-but-set-variable compiler warnings in tevent_signal.c

The results of some read(2) and write(2) calls are assigned into a
variable that is never used.  Presumably this used to avoid compiler
warnings or similar.

However, from (approximately) GCC 4.6 this produces some warnings:

  [ 609/3910] Compiling lib/tevent/tevent_signal.c
  ../lib/tevent/tevent_signal.c: In function ‘tevent_common_signal_handler’:
  ../lib/tevent/tevent_signal.c:85:10: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
  ../lib/tevent/tevent_signal.c: In function ‘signal_pipe_handler’:
  ../lib/tevent/tevent_signal.c:183:10: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]

The simplest thing to do is remove the variables and cast the function
return to void.  There is already a comment above each call.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
lib/tevent/tevent_signal.c