Skip to content
Permalink
Browse files
kbuild: enforce -Werror=unused-result
It is a hard error if a return value is ignored.
In case the return value has no meaning, remove the attribute.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
  • Loading branch information
olafhering authored and intel-lab-lkp committed Mar 19, 2021
1 parent 884a7fa commit 635ecb94f0f38a005c528c2cddb9fc6f9cfab1dc
Showing 1 changed file with 1 addition and 1 deletion.
@@ -506,7 +506,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 \
-Werror=return-type -Wno-format-security \
-Werror=return-type -Werror=unused-result -Wno-format-security \
-std=gnu89
KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_AFLAGS_KERNEL :=

0 comments on commit 635ecb9

Please sign in to comment.