Skip to content

Commit 4094920

Browse files
GustavoARSilvakuba-moo
authored andcommitted
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 <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/aMBK78xT2fUnpwE5@kspp Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ac36dea commit 4094920

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/geneve.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,16 @@ struct geneve_dev_node {
5353
};
5454

5555
struct geneve_config {
56-
struct ip_tunnel_info info;
5756
bool collect_md;
5857
bool use_udp6_rx_checksums;
5958
bool ttl_inherit;
6059
enum ifla_geneve_df df;
6160
bool inner_proto_inherit;
6261
u16 port_min;
6362
u16 port_max;
63+
64+
/* Must be last --ends in a flexible-array member. */
65+
struct ip_tunnel_info info;
6466
};
6567

6668
/* Pseudo network device */

0 commit comments

Comments
 (0)