]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
kbuild: enforce -Werror=return-type
authorOlaf Hering <olaf@aepfle.de>
Sun, 11 Oct 2020 18:54:31 +0000 (20:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jan 2021 17:26:11 +0000 (18:26 +0100)
commit 172aad81a882443eefe1bd860c4eddc81b14dd5b upstream.

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>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Makefile

index 5c9d680b7ce512175970dcd2dc82bdf2e3164554..d87ef7a839072d09eba3b38f7b871cbfa3eff3fd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -480,7 +480,7 @@ KBUILD_AFLAGS   := -D__ASSEMBLY__ -fno-PIE
 KBUILD_CFLAGS   := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
                   -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
                   -Werror=implicit-function-declaration -Werror=implicit-int \
-                  -Wno-format-security \
+                  -Werror=return-type -Wno-format-security \
                   -std=gnu89
 KBUILD_CPPFLAGS := -D__KERNEL__
 KBUILD_AFLAGS_KERNEL :=