On Fri, 13 Jan 2023 13:52:02 -0800 Stephen Hemminger <step...@networkplumber.org> wrote:
> Zero length arrays are GNU extension. Replace with > standard flex array. > > Signed-off-by: Stephen Hemminger <step...@networkplumber.org> > --- Since Mlx driver enables pedantic checking, this causes build failure on some versions of gcc. In file included from ../drivers/net/mlx5/mlx5.c:40: ../drivers/net/mlx5/mlx5_tx.h:187:23: error: invalid use of structure with flexible array member [-Werror=pedantic] 187 | struct mlx5_txq_data txq; /* Data path structure. */ | ^~~ Understand that the driver wants to enable more checking since Nvidia does good job of keeping the code up to date. But having driver specific compiler flags like this creates more unnecessary complexity and doesn't improve the resulting code.