Skip to content

Commit

Permalink
kbuild: add -Wvla flag unconditionally
Browse files Browse the repository at this point in the history
This flag is documented in the GCC 4.6 manual, and recognized by
Clang as well. Let's rip off the cc-option switch.

Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Sedat Dilek <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Acked-by: Kees Cook <[email protected]>
Tested-by: Nick Desaulniers <[email protected]>
  • Loading branch information
masahir0y committed May 18, 2019
1 parent 33ff99f commit 8289f91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
KBUILD_CFLAGS += -Wdeclaration-after-statement

# Variable Length Arrays (VLAs) should not be used anywhere in the kernel
KBUILD_CFLAGS += $(call cc-option,-Wvla)
KBUILD_CFLAGS += -Wvla

# disable pointer signed / unsigned warnings in gcc 4.0
KBUILD_CFLAGS += -Wno-pointer-sign
Expand Down

0 comments on commit 8289f91

Please sign in to comment.