Commit c3690990 authored by Janne Grunau's avatar Janne Grunau Committed by Ronald S. Bultje

build: add -Wvla to warn about undesired variable length arrays

parent d30b9339
...@@ -111,7 +111,12 @@ if (get_option('buildtype') != 'debug' and ...@@ -111,7 +111,12 @@ if (get_option('buildtype') != 'debug' and
language: 'c') language: 'c')
endif 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 foreach f : feature_defines
cdata.set(f.get(0), f.get(1)) cdata.set(f.get(0), f.get(1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment