ccc6ea5d9c
With some higher GCC/CLANG version, it is not recommended to use a
structure with a tailing flexible array inside another structure.
Accessing this array may be considered as a risk to corrupt the
following field even if it is by intention.
The error below was observed:
drivers/net/mlx5/linux/mlx5_ethdev_os.c: In function 'mlx5_get_flag_dropless_rq':
drivers/net/mlx5/linux/mlx5_ethdev_os.c:1679:42: error:
invalid use of structure with flexible array member [-Werror=pedantic]
1679 | struct ethtool_sset_info hdr;
| ^~~
Changing it to memory dynamic allocation method will help to get
rid of this complain.
Fixes:
|
||
---|---|---|
.. | ||
meson.build | ||
mlx5_ethdev_os.c | ||
mlx5_flow_os.c | ||
mlx5_flow_os.h | ||
mlx5_mp_os.c | ||
mlx5_os.c | ||
mlx5_os.h | ||
mlx5_socket.c | ||
mlx5_verbs.c | ||
mlx5_verbs.h | ||
mlx5_vlan_os.c |