Commit 579e1452 authored by Kees Cook's avatar Kees Cook Committed by Linus Torvalds

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@beastSigned-off-by: default avatarKees 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6974f0c4
...@@ -48,6 +48,7 @@ do { \ ...@@ -48,6 +48,7 @@ do { \
"i" (__FILE__), \ "i" (__FILE__), \
"i" (__LINE__), "i" (0), \ "i" (__LINE__), "i" (0), \
"i" (sizeof(struct bug_entry))); \ "i" (sizeof(struct bug_entry))); \
unreachable(); \
} while (0) } while (0)
#define __WARN_FLAGS(flags) \ #define __WARN_FLAGS(flags) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment