[PATCH v15 57/60] drivers/net: add compile warning about use of VLAs
Andre Muezerie
andremue at linux.microsoft.com
Tue Jan 14 02:23:09 CET 2025
MSVC does not support VLAs, so we want to prevent VLAs from being
introduced under this path.
Signed-off-by: Andre Muezerie <andremue at linux.microsoft.com>
---
drivers/net/meson.build | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index dafd637ba4..170e7339e5 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -68,3 +68,11 @@ drivers = [
std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
std_deps += ['bus_pci'] # very many PMDs depend on PCI, so make std
std_deps += ['bus_vdev'] # same with vdev bus
+
+warning_flags = ['-Wvla']
+
+foreach arg: warning_flags
+ if cc.has_argument(arg)
+ cflags += arg
+ endif
+endforeach
--
2.47.0.vfs.0.3
More information about the dev
mailing list