diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2019-06-06 19:46:17 -0500 |
---|---|---|
committer | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2019-07-25 20:13:54 -0500 |
commit | a035d552a93bb9ef6048733bb9f2a0dc857ff869 (patch) | |
tree | 5661bb70a44691aa257dd640625996fa9a3b017e /Makefile | |
parent | 2defb94edb44784b0b5064633e05c97fdb1b0e0f (diff) | |
download | lwn-a035d552a93bb9ef6048733bb9f2a0dc857ff869.tar.gz lwn-a035d552a93bb9ef6048733bb9f2a0dc857ff869.zip |
Makefile: Globally enable fall-through warning
Now that all the fall-through warnings have been addressed in the
kernel, enable the fall-through warning globally.
Also, update the deprecated.rst file to include implicit fall-through
as 'deprecated' so people can be pointed to a single location for
justification.
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Kees Cook <keescook@chromium.org>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -843,6 +843,9 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) # warn about C99 declaration after statement KBUILD_CFLAGS += -Wdeclaration-after-statement +# Warn about unmarked fall-throughs in switch statement. +KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough=3,) + # Variable Length Arrays (VLAs) should not be used anywhere in the kernel KBUILD_CFLAGS += -Wvla |