Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS
From: Borislav Petkov
Date: Wed Oct 17 2018 - 04:11:46 EST
On Tue, Oct 16, 2018 at 09:08:09PM -0300, Leonardo BrÃs wrote:
> Adds -Wshadow=local on KBUILD_HOSTCFLAGS to show shadow warnings
> on tools built for HOST.
>
> Signed-off-by: Leonardo BrÃs <leobras.c@xxxxxxxxx>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index e8b599b4dcde..fb0a9ac195e7 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -360,7 +360,7 @@ HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
>
> HOSTCC = gcc
> HOSTCXX = g++
> -KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
> +KBUILD_HOSTCFLAGS := -Wall -Wshadow=local -Wmissing-prototypes -Wstrict-prototypes -O2 \
> -fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS) \
> $(HOSTCFLAGS)
> KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS)
> --
You might wanna take a look at scripts/Makefile.extrawarn which already
has -Wshadow.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.