]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson.build: Compile with -Walloca
authorThomas Huth <thuth@redhat.com>
Thu, 27 May 2021 10:45:54 +0000 (12:45 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 8 Jun 2021 11:59:43 +0000 (13:59 +0200)
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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
meson.build

index 1844c73e67cc82e973dc38fd9b9074610137f212..40e99fec0cd5977701eae80c7eb17430709c0892 100644 (file)
@@ -234,6 +234,7 @@ cc_flags += [
   '-Waddress-of-packed-member',
   '-Waggressive-loop-optimizations',
   '-Walloc-size-larger-than=@0@'.format(alloc_max.stdout().strip()),
+  '-Walloca',
   '-Warray-bounds=2',
   '-Wattribute-alias=2',
   '-Wattribute-warning',