Blob Blame History Raw
From: Olaf Hering <olaf@aepfle.de>
Date: Sun, 11 Oct 2020 20:54:31 +0200
Patch-mainline: v5.10-rc1
Subject: kbuild: enforce -Werror=return-type
Git-commit: 172aad81a882443eefe1bd860c4eddc81b14dd5b
References: bsc#1177281

Catch errors which at least gcc tolerates by default:
 warning: 'return' with no value, in function returning non-void [-Wreturn-type]

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Olaf Hering <ohering@suse.de>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/Makefile
+++ b/Makefile
@@ -400,7 +400,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__
 KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
 		   -fno-strict-aliasing -fno-common -fshort-wchar \
 		   -Werror-implicit-function-declaration \
-		   -Wno-format-security \
+		   -Werror=return-type -Wno-format-security \
 		   -std=gnu89 $(call cc-option,-fno-PIE)