From: Sami Kerola Date: Fri, 8 Feb 2019 22:01:05 +0000 (+0000) Subject: include: add no return function attribute X-Git-Tag: v2.33.2~23 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b82bf1a1708a61c3071c3dc411bbcb0046703479;p=thirdparty%2Futil-linux.git include: add no return function attribute This warning is repeated 112 times when compiling with all warnings. xalloc.h:23:1: warning: function '__err_oom' could be declared with attribute 'noreturn' [-Wmissing-noreturn] Signed-off-by: Sami Kerola --- diff --git a/include/xalloc.h b/include/xalloc.h index 8870ac0d9e..09d39aa623 100644 --- a/include/xalloc.h +++ b/include/xalloc.h @@ -19,7 +19,8 @@ # define XALLOC_EXIT_CODE EXIT_FAILURE #endif -static inline void __err_oom(const char *file, unsigned int line) +static inline void __attribute__((__noreturn__)) +__err_oom(const char *file, unsigned int line) { err(XALLOC_EXIT_CODE, "%s: %u: cannot allocate memory", file, line); }