]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: enable -Wzero-length-bounds 26321/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 6 Feb 2023 08:46:55 +0000 (09:46 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 6 Feb 2023 11:09:55 +0000 (12:09 +0100)
This will warn if fake flexible arrays are re-introduced. I'm not using
-Werror=… because we may still get warnings when compiling against old kernel
headers. We can crank this up to error later.

meson.build

index d1e39c8a5a70652fe5e76e0abdc8ba96038f3844..bfc86857d62663d138d192a7a15ea57c0c2ea0e8 100644 (file)
@@ -389,6 +389,7 @@ possible_common_cc_flags = [
         '-Wsuggest-attribute=noreturn',
         '-Wunused-function',
         '-Wwrite-strings',
+        '-Wzero-length-bounds',
 
         # negative arguments are correctly detected starting with meson 0.46.
         '-Wno-error=#warnings',  # clang