[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAQaAtVsLOVLKwM_BSMf+CNgKbxCv++SQb-Bq4Z2-2Pxtg@mail.gmail.com>
Date: Thu, 6 Feb 2025 01:01:13 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Nicolas Schier <nicolas@...sle.eu>, Arnd Bergmann <arnd@...db.de>,
Andrew Morton <akpm@...ux-foundation.org>, Andy Shevchenko <andy.shevchenko@...il.com>,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] scripts/Makefile.extrawarn: Do not show clang's
non-kprintf warnings at W=1
On Sat, Feb 1, 2025 at 7:55 AM Nathan Chancellor <nathan@...nel.org> wrote:
>
> Clang's -Wformat-overflow and -Wformat-truncation have chosen to check
> '%p' unlike GCC but it does not know about the kernel's pointer
> extensions in lib/vsprintf.c, so the developers split that part of the
> warning out for the kernel to disable because there will always be false
> positives.
>
> Commit 908dd508276d ("kbuild: enable -Wformat-truncation on clang") did
> disabled these warnings but only in a block that would be called when
> W=1 was not passed, so they would appear with W=1. Move the disabling of
> the non-kprintf warnings to a block that always runs so that they are
> never seen, regardless of warning level.
>
> Fixes: 908dd508276d ("kbuild: enable -Wformat-truncation on clang")
> Reported-by: kernel test robot <lkp@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202501291646.VtwF98qd-lkp@intel.com/
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
Applied to linux-kbuild/fixes.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists