From patchwork Thu May 7 12:21:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 245277 List-Id: U-Boot discussion From: yamada.masahiro at socionext.com (Masahiro Yamada) Date: Thu, 7 May 2020 21:21:27 +0900 Subject: [PATCH] kbuild: add -Werror=implicit-function-declaration Message-ID: <20200507122127.1345392-1-yamada.masahiro@socionext.com> Add -Werror=implicit-function-declaration as Linux does. If you do not check the prototype, it may go wrong run-time. It is better to break the build, and require to include correct headers. Signed-off-by: Masahiro Yamada --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cc99873062..f8b136a07f 100644 --- a/Makefile +++ b/Makefile @@ -419,7 +419,7 @@ CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__ KBUILD_CFLAGS := -Wall -Wstrict-prototypes \ - -Wno-format-security \ + -Werror=implicit-function-declaration -Wno-format-security \ -fno-builtin -ffreestanding $(CSTD_FLAG) KBUILD_CFLAGS += -fshort-wchar -fno-strict-aliasing KBUILD_AFLAGS := -D__ASSEMBLY__