meson.build: Compile with -Walloca

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>
This commit is contained in:
Thomas Huth 2021-05-27 12:45:54 +02:00 committed by Ján Tomko
parent 6a7b8a3c0f
commit 55aaa1b037
1 changed files with 1 additions and 0 deletions

View 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',