]> git.ipfire.org Git - thirdparty/systemd.git/commit
meson: re-enable -Wmaybe-uninitialized on -O[02] with recent gcc versions 19226/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 31 Mar 2021 15:05:49 +0000 (17:05 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 8 Apr 2021 11:12:56 +0000 (13:12 +0200)
commit68c98a411d67ea64bb356ca02e01e8ec7defbef9
treed34edbe9f236596063d8b39ac96e348dc0b547cb
parent98d81cf9743cf9f4c37a45670a9b5e97e071b57f
meson: re-enable -Wmaybe-uninitialized on -O[02] with recent gcc versions

The warning was disabled in 8794164fed5f0142c34358613f92f4f761af4edd to avoid
false positives. But it is useful in finding errors, even if it sometimes
results in untrue warnings (c.f. 77fac974feda46a1bc3c).

After #19168, #19169, and #19175, there are no warnings with
-Dbuildtype=debug-optimized/-O2 and gcc-11.0.1-0.3.fc34.x86_64. Warnings
are reenabled for -O[23]

-O0 is good for development, and -O2 is the default optimization level for
Fedora package builds. -Os, -O3, -O1, and -Og still generate some warnings. In
fact, with -Os the number of warnings seems completely hopeless. Dozens and
dozens.
meson.build