From: Roy Marples Date: Fri, 5 Sep 2008 11:46:03 +0000 (+0000) Subject: Mark functions as _noreturn. X-Git-Tag: v5.0.0~291 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ce8caf249d3f477eacbcb45cf31322798551b2d;p=thirdparty%2Fdhcpcd.git Mark functions as _noreturn. --- diff --git a/common.h b/common.h index a9715d63..82adbada 100644 --- a/common.h +++ b/common.h @@ -47,8 +47,10 @@ } while (0 /* CONSTCOND */); #if __GNUC__ > 2 || defined(__INTEL_COMPILER) -# define _unused __attribute__((__unused__)) +# define _noreturn __attribute__((__noreturn__)) +# define _unused __attribute__((__unused__)) #else +# define _noreturn # define _unused #endif diff --git a/dhcpcd.c b/dhcpcd.c index 3094fd2b..acbcd54b 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -153,7 +153,7 @@ cleanup(void) } } -void +_noreturn void handle_exit_timeout(_unused void *arg) { logger(LOG_ERR, "timed out"); diff --git a/eloop.c b/eloop.c index 981d8eef..7655f5a7 100644 --- a/eloop.c +++ b/eloop.c @@ -261,7 +261,7 @@ delete_timeout(void (*callback)(void *), void *arg) } } -void +_noreturn void start_eloop(void) { int msecs, n; @@ -326,7 +326,7 @@ start_eloop(void) get_monotonic(&now); continue; } - logger(LOG_ERR, "poll: %s", strerror(errno)); + logger(LOG_ERR, "poll: %m"); exit(EXIT_FAILURE); }