]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: add -Wimplicit-fallthrough=3 to compilation options (#7393)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 20 Nov 2017 11:14:47 +0000 (12:14 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 20 Nov 2017 11:14:47 +0000 (12:14 +0100)
At some point before gcc-7 was released, -Wimplicit-fallthrough=3 was included
in -Wextra. The documentation for gcc-7.2.1-2.fc27.x86_64 still says that, but
empirical testing shows that it's not. The documentation also misstates that
-Wimplicit-fallthrough is equivalent to -Wimplicit-fallthrough=3.

Let's add -Wimplicit-fallthrough=3 explicitly to get the warnings if we regress.

Prompted by #7389.

meson.build

index f376d030fd151866874d035a6c430755d5af653d..b038d6df820d33fae87d50f403af386550282de0 100644 (file)
@@ -271,6 +271,7 @@ foreach arg : ['-Wextra',
                '-Wstrict-prototypes',
                '-Wredundant-decls',
                '-Wmissing-noreturn',
+               '-Wimplicit-fallthrough=3',
                '-Wshadow',
                '-Wendif-labels',
                '-Wstrict-aliasing=2',