Re: [PATCH v2] kbuild: Move -Wenum-enum-conversion to W=2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 17, 2024, at 17:09, Nathan Chancellor wrote:
> -Wenum-enum-conversion was strengthened in clang-19 to warn for C, which
> caused the kernel to move it to W=1 in commit 75b5ab134bb5 ("kbuild:
> Move -Wenum-{compare-conditional,enum-conversion} into W=1") because
> there were numerous instances that would break builds with -Werror.
> Unfortunately, this is not a full solution, as more and more developers,
> subsystems, and distributors are building with W=1 as well, so they
> continue to see the numerous instances of this warning.
>
> Since the move to W=1, there have not been many new instances that have
> appeared through various build reports and the ones that have appeared
> seem to be following similar existing patterns, suggesting that most
> instances of this warning will not be real issues. The only alternatives
> for silencing this warning are adding casts (which is generally seen as
> an ugly practice) or refactoring the enums to macro defines or a unified
> enum (which may be undesirable because of type safety in other parts of
> the code).
>
> Move the warning to W=2, where warnings that occur frequently but may be
> relevant should reside.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 75b5ab134bb5 ("kbuild: Move 
> -Wenum-{compare-conditional,enum-conversion} into W=1")
> Link: https://lore.kernel.org/ZwRA9SOcOjjLJcpi@xxxxxxxxxx/
> Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux