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

Kees Cook keescook at chromium.org
Thu Oct 11 01:47:05 AEDT 2018


On Tue, Oct 9, 2018 at 10:13 PM, Michael Ellerman <mpe at ellerman.id.au> wrote:
> Warn whenever a switch statement has a fallthrough without a comment
> annotating it.
>
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>

Yes please. :)

Reviewed-by: Kees Cook <keescook at chromium.org>

-Kees

> ---
>  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
>



-- 
Kees Cook
Pixel Security


More information about the Linuxppc-dev mailing list