[PATCH 4/4] powerpc: Add -Wimplicit-fallthrough to arch CFLAGS

Michael Ellerman mpe at ellerman.id.au
Wed Oct 10 16:13:08 AEDT 2018


Warn whenever a switch statement has a fallthrough without a comment
annotating it.

Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
 arch/powerpc/Kbuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/Kbuild b/arch/powerpc/Kbuild
index 86b261d6bde5..ef625f1db576 100644
--- a/arch/powerpc/Kbuild
+++ b/arch/powerpc/Kbuild
@@ -1,4 +1,5 @@
 subdir-ccflags-y := $(call cc-option, -Wvla)
+subdir-ccflags-y += $(call cc-option, -Wimplicit-fallthrough)
 subdir-ccflags-$(CONFIG_PPC_WERROR) += -Werror
 
 obj-y += kernel/
-- 
2.17.1



More information about the Linuxppc-dev mailing list