]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include: add no return function attribute
authorSami Kerola <kerolasa@iki.fi>
Fri, 8 Feb 2019 22:01:05 +0000 (22:01 +0000)
committerKarel Zak <kzak@redhat.com>
Mon, 18 Feb 2019 12:21:23 +0000 (13:21 +0100)
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 <kerolasa@iki.fi>
include/xalloc.h

index 1d225d4a0edb61dfa767d3a2876aa94453f39904..0129a85e2e5bb2a753049b5b4a52780941e52f49 100644 (file)
@@ -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);
 }