From 55aaa1b037df0a6e5815e27c9be1afcb74781cf3 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Thu, 27 May 2021 12:45:54 +0200 Subject: [PATCH] meson.build: Compile with -Walloca MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ján Tomko Signed-off-by: Ján Tomko --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index 1844c73e67..40e99fec0c 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@'.format(alloc_max.stdout().strip()), + '-Walloca', '-Warray-bounds=2', '-Wattribute-alias=2', '-Wattribute-warning', -- 2.47.3