summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSami Kerola2019-02-08 23:01:05 +0100
committerKarel Zak2019-02-18 13:21:23 +0100
commite73456dfbb36c8d19a802ffe46b8ebccd77ccb22 (patch)
tree9004089c2d676beecea3bb363a9d5ffb8d9f9515 /include
parenthardlink, wall: fix variable shadowing (diff)
downloadkernel-qcow2-util-linux-e73456dfbb36c8d19a802ffe46b8ebccd77ccb22.tar.gz
kernel-qcow2-util-linux-e73456dfbb36c8d19a802ffe46b8ebccd77ccb22.tar.xz
kernel-qcow2-util-linux-e73456dfbb36c8d19a802ffe46b8ebccd77ccb22.zip
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 <kerolasa@iki.fi>
Diffstat (limited to 'include')
-rw-r--r--include/xalloc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/xalloc.h b/include/xalloc.h
index 1d225d4a0..0129a85e2 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);
}