[PATCH] drivers: allow build with VLAs
David Marchand
david.marchand at redhat.com
Sat Feb 8 17:11:20 CET 2025
On Sat, Feb 8, 2025 at 10:29 AM Thomas Monjalon <thomas at monjalon.net> wrote:
>
> The drivers nfb, mvpp2 and mvsam use some variable length arrays
> in their code, so the warnings about VLA must be disabled for now,
> until removal for MSVC support, as in some other drivers.
>
> The warnings look like below:
>
> nfb_rx.h:156:16: error:
> ISO C90 forbids variable length array 'packets' [-Werror=vla]
> 156 | struct ndp_packet packets[nb_pkts];
>
> mvpp2/mrvl_flow.c:108:9: error:
> ISO C90 forbids variable length array 'zeros' [-Werror=vla]
> 108 | uint8_t zeros[size];
>
> mvsam/rte_mrvl_pmd.c:865:16: error:
> ISO C90 forbids variable length array 'requests_crp' [-Werror=vla]
> 865 | struct sam_cio_op_params requests_crp[nb_ops];
>
> Fixes: 1bf86800f7da ("build: warn on uses of VLA")
>
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: David Marchand <david.marchand at redhat.com>
--
David Marchand
More information about the dev
mailing list