diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-14 17:05:38 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-17 00:33:45 +0900 |
commit | eeb5687a7139649e1724674441580b778f5ff7ab (patch) | |
tree | 5a4dc04f50c93fa4ac74da7d357f7429725ab008 /Makefile | |
parent | 42a92bccd213ce4b7198d2e943ac0efe88cbe1aa (diff) | |
download | linux-eeb5687a7139649e1724674441580b778f5ff7ab.tar.bz2 |
kbuild: add -Werror=strict-prototypes flag unconditionally
-Wstrict-prototypes is added to KBUILD_CFLAGS first, then overridden
by -Werror=strict-prototypes later.
Let's add -Werror=strict-prototypes unconditionally because it is
supported by GCC 4.6, and also by Clang.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -427,7 +427,7 @@ LINUXINCLUDE := \ $(USERINCLUDE) KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE -KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ +KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \ -Werror-implicit-function-declaration \ -Wno-format-security \ @@ -832,9 +832,6 @@ KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) # disallow errors like 'EXPORT_GPL(foo);' with missing header KBUILD_CFLAGS += $(call cc-option,-Werror=implicit-int) -# require functions to have arguments in prototypes, not empty 'int foo()' -KBUILD_CFLAGS += $(call cc-option,-Werror=strict-prototypes) - # Prohibit date/time macros, which would make the build non-deterministic KBUILD_CFLAGS += $(call cc-option,-Werror=date-time) |