Re: [PATCH] Revert "Enable '-Werror' by default for all kernel builds"
From: Steven Rostedt
Date: Wed Sep 08 2021 - 12:12:39 EST
On Tue, Sep 07, 2021 at 12:16:22PM -0700, Linus Torvalds wrote:
>
> That's the POINT of that commit. That "but but but I have thousands of
> warnings" is not acceptable.
I'm actually surprised you did this after the discussion with gcc warning
about using "main" as a local variable.
> My "no warnings" policy isn't exactly new, and people shouldn't be
> shocked when I then say "time to clean up *YOUR* house too".
Note, ktest has a way to create a list of current warnings, and then test your
code against it, and will fail on any new warning. I run this on all my pull
requests to make sure that I do not introduce any new warnings.
That said, I still get bug reports on various configs that I did not test,
where my code introduces a warning. I hate to be the one that fails their
builds.
It's not the configs that have something enabled, its the configs that have
something not enabled, where another config depends on it.
I'm not against the -Werror. I just don't want to be changing local variables
called "main" because it breaks someones build due to some daft warning that
the compiler is emitting.
-- Steve