Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

geneve: Avoid -Wflex-array-member-not-at-end warning

-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.

Move the conflicting declaration to the end of the corresponding
structure. Notice that `struct ip_tunnel_info` is a flexible
structure, this is a structure that contains a flexible-array
member.

Fix the following warning:

drivers/net/geneve.c:56:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/aMBK78xT2fUnpwE5@kspp
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Gustavo A. R. Silva and committed by
Jakub Kicinski
4094920b ac36dea3

+3 -1
+3 -1
drivers/net/geneve.c
··· 53 53 }; 54 54 55 55 struct geneve_config { 56 - struct ip_tunnel_info info; 57 56 bool collect_md; 58 57 bool use_udp6_rx_checksums; 59 58 bool ttl_inherit; ··· 60 61 bool inner_proto_inherit; 61 62 u16 port_min; 62 63 u16 port_max; 64 + 65 + /* Must be last --ends in a flexible-array member. */ 66 + struct ip_tunnel_info info; 63 67 }; 64 68 65 69 /* Pseudo network device */