Linus Torvalds 78a5255ffb Stop the ad-hoc games with -Wno-maybe-initialized
We have some rather random rules about when we accept the
"maybe-initialized" warnings, and when we don't.

For example, we consider it unreliable for gcc versions < 4.9, but also
if -O3 is enabled, or if optimizing for size.  And then various kernel
config options disabled it, because they know that they trigger that
warning by confusing gcc sufficiently (ie PROFILE_ALL_BRANCHES).

And now gcc-10 seems to be introducing a lot of those warnings too, so
it falls under the same heading as 4.9 did.

At the same time, we have a very straightforward way to _enable_ that
warning when wanted: use "W=2" to enable more warnings.

So stop playing these ad-hoc games, and just disable that warning by
default, with the known and straight-forward "if you want to work on the
extra compiler warnings, use W=123".

Would it be great to have code that is always so obvious that it never
confuses the compiler whether a variable is used initialized or not?
Yes, it would.  In a perfect world, the compilers would be smarter, and
our source code would be simpler.

That's currently not the world we live in, though.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-05-09 13:57:10 -07:00
..
2020-04-24 17:42:44 -07:00
2020-04-03 13:12:26 -07:00
2019-11-27 11:42:01 -08:00
2019-12-18 18:07:31 +01:00
\n
2020-04-06 08:58:42 -07:00
2020-03-30 18:06:39 -07:00
2020-03-21 16:00:24 +01:00
2020-01-08 16:32:55 +00:00
2019-05-24 20:16:01 +02:00
2020-04-09 12:52:34 -07:00
2020-03-21 18:56:06 -07:00
2020-01-14 12:20:48 +01:00
2019-12-04 15:18:39 +01:00
2020-03-30 18:06:39 -07:00
2019-12-18 18:07:31 +01:00
2020-04-28 17:54:13 +02:00
2019-07-08 19:36:47 -07:00
2019-07-08 19:36:47 -07:00