public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] kbuild: enforce -Werror=unused-result
@ 2021-03-19 14:32 Olaf Hering
  2021-03-25 11:16 ` Olaf Hering
  0 siblings, 1 reply; 5+ messages in thread
From: Olaf Hering @ 2021-03-19 14:32 UTC (permalink / raw)
  To: linux-kbuild, linux-kernel; +Cc: Olaf Hering, Masahiro Yamada, Michal Marek

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>
---
v2:
  resend

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index a28bb374663d..9b7def6db494 100644
--- a/Makefile
+++ b/Makefile
@@ -495,7 +495,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 :=

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-25 17:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-19 14:32 [PATCH v2] kbuild: enforce -Werror=unused-result Olaf Hering
2021-03-25 11:16 ` Olaf Hering
2021-03-25 16:55   ` Masahiro Yamada
2021-03-25 17:07     ` Olaf Hering
2021-03-25 17:32       ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox