Skip to content

Commit

Permalink
lib/netinfo-private: fix Clang 17 warning
Browse files Browse the repository at this point in the history
      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 <[email protected]>
  • Loading branch information
madrisan committed Nov 9, 2023
1 parent 1e6cac2 commit e7c647a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/netinfo-private.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e7c647a

Please sign in to comment.