We are already compiling libvirt with -Wvla - so it does not make
too much sense to still allow people to use alloca() instead. Thus
put it on the list of things we want to warn about. Fortunately,
there is currently no warning with this flag, so the current
sources should be clean.
Signed-off-by: Thomas Huth <thuth(a)redhat.com>
---
meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/meson.build b/meson.build
index 40c841e777..a97efdf8f4 100644
--- a/meson.build
+++ b/meson.build
@@ -234,6 +234,7 @@ cc_flags += [
'-Waddress-of-packed-member',
'-Waggressive-loop-optimizations',
'-Walloc-size-larger-than=@0(a)'.format(alloc_max.stdout().strip()),
+ '-Walloca',
'-Warray-bounds=2',
'-Wattribute-alias=2',
'-Wattribute-warning',
--
2.27.0