Use __attribute__((unused))

This commit is contained in:
Marco d'Itri 2023-11-05 00:59:24 +01:00
parent e2b38d570b
commit bd1c31c597
2 changed files with 3 additions and 1 deletions

View File

@ -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)))

View File

@ -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."));