meson.build: enable VLA warning

variable length arrays can be dangerous, so better don't use
them at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1819>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-08-28 13:24:08 +02:00
parent b4f0c1abd5
commit 2e6f3a632b

View File

@ -13,6 +13,7 @@ cc = meson.get_compiler('c')
add_project_arguments('-fno-strict-aliasing', language : 'c')
add_project_arguments('-fvisibility=hidden', language : 'c')
add_project_arguments('-Wvla', language: 'c')
add_project_link_arguments('-fvisibility=hidden', language : 'c')
@ -46,6 +47,7 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
'-Werror=address',
'-Werror=int-to-pointer-cast',
'-Werror=pointer-to-int-cast',
'-Wvla',
]
else
test_wflags = []