Commit 0f0ea7f7 authored by Martin Pool's avatar Martin Pool

Add UNUSED macro that expands to a parameter attribute annotation on

gcc, to quieten its worries about parameters that must always be
unused.
parent 0b4af330
......@@ -786,17 +786,17 @@ static int start_client(int argc, char *argv[])
}
static RETSIGTYPE sigusr1_handler(int val) {
static RETSIGTYPE sigusr1_handler(int UNUSED(val)) {
exit_cleanup(RERR_SIGNAL);
}
static RETSIGTYPE sigusr2_handler(int val) {
static RETSIGTYPE sigusr2_handler(int UNUSED(val)) {
extern int log_got_error;
if (log_got_error) _exit(RERR_PARTIAL);
_exit(0);
}
static RETSIGTYPE sigchld_handler(int val) {
static RETSIGTYPE sigchld_handler(int UNUSED(val)) {
#ifdef WNOHANG
while (waitpid(-1, NULL, WNOHANG) > 0) ;
#endif
......
......@@ -609,3 +609,9 @@ inet_ntop(int af, const void *src, char *dst, size_t size);
#ifndef HAVE_INET_PTON
int isc_net_pton(int af, const char *src, void *dst);
#endif
#ifdef __GNUC__
# define UNUSED(x) x __attribute__((__unused__))
#else
# define UNUSED(x) x
#endif /* ndef __GNUC__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment