[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210319143231.25500-1-olaf@aepfle.de>
Date: Fri, 19 Mar 2021 15:32:31 +0100
From: Olaf Hering <olaf@...fle.de>
To: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Olaf Hering <olaf@...fle.de>,
Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>
Subject: [PATCH v2] 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@...fle.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 :=
Powered by blists - more mailing lists