diff options
author | Rabin Vincent <rabin@rab.in> | 2015-05-14 08:36:55 -0400 |
---|---|---|
committer | Jesper Nilsson <jespern@axis.com> | 2015-09-04 18:33:24 -0400 |
commit | 98a725a57a8e92bfbe962a8c69975ce0f9ff11fe (patch) | |
tree | cdb477ec15956d0fb1191db240f202aaf8c804f1 | |
parent | 6a4756f6951f97a9a601ba24632c5906750ef00d (diff) |
CRISv32: add unreachable() to BUG()
Add an unreachable() in the BUG() implementations, to get rid of
several warnings similar to the one below:
kernel/sched/core.c: In function 'pick_next_task':
kernel/sched/core.c:2690:1: warning: control reaches end of non-void function [-Wreturn-type]
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
-rw-r--r-- | arch/cris/include/arch-v32/arch/bug.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/cris/include/arch-v32/arch/bug.h b/arch/cris/include/arch-v32/arch/bug.h index 0f211e135248..fb59faaaae0a 100644 --- a/arch/cris/include/arch-v32/arch/bug.h +++ b/arch/cris/include/arch-v32/arch/bug.h | |||
@@ -10,6 +10,7 @@ | |||
10 | * All other stuff is done out-of-band with exception handlers. | 10 | * All other stuff is done out-of-band with exception handlers. |
11 | */ | 11 | */ |
12 | #define BUG() \ | 12 | #define BUG() \ |
13 | do { \ | ||
13 | __asm__ __volatile__ ("0: break 14\n\t" \ | 14 | __asm__ __volatile__ ("0: break 14\n\t" \ |
14 | ".section .fixup,\"ax\"\n" \ | 15 | ".section .fixup,\"ax\"\n" \ |
15 | "1:\n\t" \ | 16 | "1:\n\t" \ |
@@ -21,9 +22,15 @@ | |||
21 | ".section __ex_table,\"a\"\n\t" \ | 22 | ".section __ex_table,\"a\"\n\t" \ |
22 | ".dword 0b, 1b\n\t" \ | 23 | ".dword 0b, 1b\n\t" \ |
23 | ".previous\n\t" \ | 24 | ".previous\n\t" \ |
24 | : : "ri" (__FILE__), "i" (__LINE__)) | 25 | : : "ri" (__FILE__), "i" (__LINE__)); \ |
26 | unreachable(); \ | ||
27 | } while (0) | ||
25 | #else | 28 | #else |
26 | #define BUG() __asm__ __volatile__ ("break 14\n\t") | 29 | #define BUG() \ |
30 | do { \ | ||
31 | __asm__ __volatile__ ("break 14\n\t"); \ | ||
32 | unreachable(); \ | ||
33 | } while (0) | ||
27 | #endif | 34 | #endif |
28 | 35 | ||
29 | #define HAVE_ARCH_BUG | 36 | #define HAVE_ARCH_BUG |