diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c index e4eb72a3b..4f8e9a4cc 100644 --- a/libnm-core/nm-setting-team.c +++ b/libnm-core/nm-setting-team.c @@ -122,6 +122,8 @@ nm_team_link_watcher_new_ethtool(int delay_up, int delay_down, GError **error) return NULL; } + NM_PRAGMA_WARNING_DISABLE("-Warray-bounds") + watcher = g_malloc(nm_offsetofend(NMTeamLinkWatcher, ethtool)); watcher->ref_count = 1; @@ -129,6 +131,8 @@ nm_team_link_watcher_new_ethtool(int delay_up, int delay_down, GError **error) watcher->ethtool.delay_up = delay_up; watcher->ethtool.delay_down = delay_down; + NM_PRAGMA_WARNING_REENABLE + return watcher; }