diff options
author | Janne Grunau <janne-vlc@jannau.net> | 2018-09-26 00:20:07 +0300 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2018-09-26 02:07:21 +0300 |
commit | c36909909e1b531fdc0f2dc4f0bf3fdd8f2692fa (patch) | |
tree | 96df7aeda85acc21da585d7d651d77d337e407f8 | |
parent | d30b933940c309c9a0af0f4ae017db920ffb1037 (diff) |
build: add -Wvla to warn about undesired variable length arrays
-rw-r--r-- | meson.build | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meson.build b/meson.build index ce24d04..f993f6f 100644 --- a/meson.build +++ b/meson.build @@ -111,7 +111,12 @@ if (get_option('buildtype') != 'debug' and language: 'c') endif -add_project_arguments('-Wundef', language: 'c') +warning_flags = [ + '-Wundef', + '-Wvla', # should be '-Werror=vla +] + +add_project_arguments(cc.get_supported_arguments(warning_flags), language: 'c') foreach f : feature_defines cdata.set(f.get(0), f.get(1)) |