Skip to content

Commit bfd7714

Browse files
JoePerchestorvalds
authored andcommitted
Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang
A compilation -Wimplicit-fallthrough warning was enabled by commit a035d55 ("Makefile: Globally enable fall-through warning") Even though clang 10.0.0 does not currently support this warning without a patch, clang currently does not support a value for this option. Link: https://bugs.llvm.org/show_bug.cgi?id=39382 The gcc default for this warning is 3 so removing the =3 has no effect for gcc and enables the warning for patched versions of clang. Also remove the =3 from an existing use in a parisc Makefile: arch/parisc/math-emu/Makefile Signed-off-by: Joe Perches <[email protected]> Reviewed-and-tested-by: Nathan Chancellor <[email protected]> Cc: Gustavo A. R. Silva <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 5aa9100 commit bfd7714

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
846846
KBUILD_CFLAGS += -Wdeclaration-after-statement
847847

848848
# Warn about unmarked fall-throughs in switch statement.
849-
KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough=3,)
849+
KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,)
850850

851851
# Variable Length Arrays (VLAs) should not be used anywhere in the kernel
852852
KBUILD_CFLAGS += -Wvla

arch/parisc/math-emu/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ obj-y := frnd.o driver.o decode_exc.o fpudispatch.o denormal.o \
1818
# other very old or stripped-down PA-RISC CPUs -- not currently supported
1919

2020
obj-$(CONFIG_MATH_EMULATION) += unimplemented-math-emulation.o
21-
CFLAGS_REMOVE_fpudispatch.o = -Wimplicit-fallthrough=3
21+
CFLAGS_REMOVE_fpudispatch.o = -Wimplicit-fallthrough

0 commit comments

Comments
 (0)