[v14,52/81] lib/mempool: add compile warning about use of VLAs

Message ID 1736540620-21764-53-git-send-email-andremue@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series remove use of VLAs for Windows |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Andre Muezerie Jan. 10, 2025, 8:23 p.m. UTC
MSVC does not support VLAs, so we want to prevent VLAs from being
introduced under this path.

Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
---
 lib/mempool/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/lib/mempool/meson.build b/lib/mempool/meson.build
index 8099a56466..3921945fb3 100644
--- a/lib/mempool/meson.build
+++ b/lib/mempool/meson.build
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-extra_flags = []
+extra_flags = ['-Wvla']
 
 foreach flag: extra_flags
     if cc.has_argument(flag)