This path is known to make use of VLAs, so we need to disable warnings
issued for VLAs to prevent the build from breaking.

Signed-off-by: Andre Muezerie <andre...@linux.microsoft.com>
---
 app/test/meson.build | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index d5cb6a7f7a..22b505b2be 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -247,12 +247,18 @@ foreach d:optional_deps
     endif
 endforeach
 
-if cc.has_argument('-Wno-format-truncation')
-    cflags += '-Wno-format-truncation'
-endif
+extra_flags = [
+    # Strict-aliasing rules are violated by uint8_t[] to context size casts.
+    '-fno-strict-aliasing',
+    '-Wno-format-truncation',
+    '-Wno-vla',
+]
 
-# Strict-aliasing rules are violated by uint8_t[] to context size casts.
-cflags += '-fno-strict-aliasing'
+foreach arg: extra_flags
+    if cc.has_argument(arg)
+        cflags += arg
+    endif
+endforeach
 
 # Enable using internal APIs in unit tests
 cflags += '-DALLOW_INTERNAL_API'
-- 
2.47.0.vfs.0.3

Reply via email to