From 067669dac74abfa2acaaef6b1d078d861814e100 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 22 Aug 2003 05:04:13 +0000 Subject: [PATCH] Made the UNUSED(parameter) macro calls read a little nicer. --- main.c | 11 +++++++---- socket.c | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 629eb35b..810576f9 100644 --- a/main.c +++ b/main.c @@ -877,17 +877,20 @@ static int start_client(int argc, char *argv[]) } -static RETSIGTYPE sigusr1_handler(int UNUSED(val)) { +static RETSIGTYPE sigusr1_handler(UNUSED(int val)) +{ exit_cleanup(RERR_SIGNAL); } -static RETSIGTYPE sigusr2_handler(int UNUSED(val)) { +static RETSIGTYPE sigusr2_handler(UNUSED(int val)) +{ extern int log_got_error; if (log_got_error) _exit(RERR_PARTIAL); _exit(0); } -static RETSIGTYPE sigchld_handler(int UNUSED(val)) { +static RETSIGTYPE sigchld_handler(UNUSED(int val)) +{ #ifdef WNOHANG int cnt, status; pid_t pid; @@ -945,7 +948,7 @@ const char *get_panic_action(void) * should just look at the environment variable, but I'm a bit leery * of a signal sending us into a busy loop. **/ -static RETSIGTYPE rsync_panic_handler(int UNUSED(whatsig)) +static RETSIGTYPE rsync_panic_handler(UNUSED(int whatsig)) { char cmd_buf[300]; int ret; diff --git a/socket.c b/socket.c index cb15441f..a19542f8 100644 --- a/socket.c +++ b/socket.c @@ -374,7 +374,8 @@ int is_a_socket(int fd) } -static RETSIGTYPE sigchld_handler(int UNUSED(val)) { +static RETSIGTYPE sigchld_handler(UNUSED(int val)) +{ signal(SIGCHLD, sigchld_handler); #ifdef WNOHANG while (waitpid(-1, NULL, WNOHANG) > 0) {} -- 2.34.1