[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <88c64f5e-4586-4b38-b3c8-0c3af93a71ae@linuxfoundation.org>
Date: Thu, 30 May 2024 08:25:18 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: John Hubbard <jhubbard@...dia.com>, Shuah Khan <shuah@...nel.org>
Cc: Beau Belgrave <beaub@...ux.microsoft.com>,
Steven Rostedt <rostedt@...dmis.org>, Mark Brown <broonie@...nel.org>,
Naresh Kamboju <naresh.kamboju@...aro.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Justin Stitt <justinstitt@...gle.com>, Bill Wendling <morbo@...gle.com>,
sunliming <sunliming@...inos.cn>, Masami Hiramatsu <mhiramat@...nel.org>,
Valentin Obst <kernel@...entinobst.de>, linux-kselftest@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>, llvm@...ts.linux.dev,
Nathan Chancellor <nathan@...nel.org>, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH 2/2] selftests/lib.mk: silence some clang warnings that
gcc already ignores
On 5/28/24 20:08, John Hubbard wrote:
> gcc defaults to silence (off) for the following warnings, but clang
> defaults to the opposite. These warnings are not useful for kselftests,
> so silence them for the clang builds as well:
Please you add more information on why they aren't useful
for kselftests.
>
> -Wno-address-of-packed-member
> -Wno-gnu-variable-sized-type-not-at-end
>
> This eliminates warnings for the net/ and user_events/ kselftest
> subsystems, in these files:
>
> ./net/af_unix/scm_rights.c
> ./net/timestamping.c
> ./net/ipsec.c
> ./user_events/perf_test.c
>
> Cc: Nathan Chancellor <nathan@...nel.org>
> Signed-off-by: John Hubbard <jhubbard@...dia.com>
> ---
> tools/testing/selftests/lib.mk | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> index 2902787b89b2..41e879f3f8a2 100644
> --- a/tools/testing/selftests/lib.mk
> +++ b/tools/testing/selftests/lib.mk
> @@ -50,6 +50,12 @@ else
> CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%))
> endif # CROSS_COMPILE
>
> +# gcc defaults to silence (off) for the following warnings, but clang defaults
> +# to the opposite. These warnings are not useful for kselftests, so silence them
> +# for the clang builds as well.
> +CFLAGS += -Wno-address-of-packed-member
> +CFLAGS += -Wno-gnu-variable-sized-type-not-at-end
> +
> CC := $(CLANG) $(CLANG_FLAGS) -fintegrated-as
> else
> CC := $(CROSS_COMPILE)gcc
thanks,
-- Shuah
Powered by blists - more mailing lists