diff --git a/utils.h b/utils.h index 68c486c..1147ebb 100644 --- a/utils.h +++ b/utils.h @@ -18,9 +18,11 @@ #ifdef __GNUC__ # define NORETURN __attribute__((noreturn)) # define NONNULL __attribute__((returns_nonnull)) +# define UNUSED __attribute__((unused)) #else # define NORETURN # define NONNULL +# define UNUSED #endif #if defined __GNUC__ && !defined __clang__ # define MALLOC_FREE __attribute__((malloc(free))) diff --git a/whois.c b/whois.c index 0a06b76..c4b9742 100644 --- a/whois.c +++ b/whois.c @@ -1145,7 +1145,7 @@ int connect_with_timeout(int fd, const struct sockaddr *addr, return 0; } -void NORETURN alarm_handler(int signum) +void NORETURN alarm_handler(UNUSED int signum) { close(sockfd); err_quit(_("Timeout."));