summaryrefslogtreecommitdiffstats
path: root/arch/sh/include
diff options
context:
space:
mode:
authorKees Cook2017-07-12 23:36:13 +0200
committerLinus Torvalds2017-07-13 01:26:03 +0200
commit579e14524c6593cb651a806a6563e14b263c00e2 (patch)
tree3cf7b301013614ccabf8458ba78ca7011bb23ce5 /arch/sh/include
parentinclude/linux/string.h: add the option of fortified string.h functions (diff)
downloadkernel-qcow2-linux-579e14524c6593cb651a806a6563e14b263c00e2.tar.gz
kernel-qcow2-linux-579e14524c6593cb651a806a6563e14b263c00e2.tar.xz
kernel-qcow2-linux-579e14524c6593cb651a806a6563e14b263c00e2.zip
sh: mark end of BUG() implementation as unreachable
When building the sh architecture, the compiler doesn't realize that BUG() doesn't return, so it will complain about functions using BUG() that are marked with the noreturn attribute: lib/string.c: In function 'fortify_panic': >> lib/string.c:986:1: warning: 'noreturn' function does return } ^ Link: http://lkml.kernel.org/r/20170627192050.GA66784@beast Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Cc: Daniel Micay <danielmicay@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r--arch/sh/include/asm/bug.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sh/include/asm/bug.h b/arch/sh/include/asm/bug.h
index 1b77f068be2b..c9828f785ca0 100644
--- a/arch/sh/include/asm/bug.h
+++ b/arch/sh/include/asm/bug.h
@@ -48,6 +48,7 @@ do { \
"i" (__FILE__), \
"i" (__LINE__), "i" (0), \
"i" (sizeof(struct bug_entry))); \
+ unreachable(); \
} while (0)
#define __WARN_FLAGS(flags) \