ref: c36909909e1b531fdc0f2dc4f0bf3fdd8f2692fa
parent: d30b933940c309c9a0af0f4ae017db920ffb1037
author: Janne Grunau <[email protected]>
date: Tue Sep 25 19:20:07 EDT 2018
build: add -Wvla to warn about undesired variable length arrays
--- a/meson.build
+++ b/meson.build
@@ -111,7 +111,12 @@
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))