linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] kbuild: enforce -Werror=return-type
@ 2020-10-11 18:54 Olaf Hering
  2020-10-12  3:25 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Olaf Hering @ 2020-10-11 18:54 UTC (permalink / raw)
  To: linux-kbuild, linux-kernel; +Cc: Olaf Hering, Masahiro Yamada, Michal Marek

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>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f84d7e4ca0be..965e7259e6e8 100644
--- a/Makefile
+++ b/Makefile
@@ -497,7 +497,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 :=

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

* Re: [PATCH v2] kbuild: enforce -Werror=return-type
  2020-10-11 18:54 [PATCH v2] kbuild: enforce -Werror=return-type Olaf Hering
@ 2020-10-12  3:25 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2020-10-12  3:25 UTC (permalink / raw)
  To: Olaf Hering
  Cc: Linux Kbuild mailing list, Linux Kernel Mailing List, Michal Marek

On Mon, Oct 12, 2020 at 3:54 AM Olaf Hering <olaf@aepfle.de> wrote:
>
> Catch errors which at least gcc tolerates by default:
>  warning: 'return' with no value, in function returning non-void [-Wreturn-type]


Applied to linux-kbuild. Thanks.



> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index f84d7e4ca0be..965e7259e6e8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -497,7 +497,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 :=



-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2020-10-12  3:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-11 18:54 [PATCH v2] kbuild: enforce -Werror=return-type Olaf Hering
2020-10-12  3:25 ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).