From e7c647a65ce54fe026e070cc452ece461d81c0d3 Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Thu, 9 Nov 2023 22:45:31 +0100 Subject: [PATCH] lib/netinfo-private: fix Clang 17 warning CC netinfo-private.o netinfo-private.c:138:34: warning: field 'req' with variable sized type 'struct ethtool_link_settings' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] 138 | struct ethtool_link_settings req; | ^ 1 warning generated. Signed-off-by: Davide Madrisan --- lib/netinfo-private.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netinfo-private.c b/lib/netinfo-private.c index 9bd2025..a7bcc5e 100644 --- a/lib/netinfo-private.c +++ b/lib/netinfo-private.c @@ -135,8 +135,8 @@ check_link_speed (const char *ifname, uint32_t *speed, uint8_t *duplex) #ifdef ETHTOOL_GLINKSETTINGS # define ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32 (SCHAR_MAX) struct elinkset { - struct ethtool_link_settings req; uint32_t link_mode_data[3 * ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32]; + struct ethtool_link_settings req; } elinkset; #endif