diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c index 1e8c7149dc..4f4637eeda 100644 --- a/libnm-core/nm-setting-team.c +++ b/libnm-core/nm-setting-team.c @@ -116,6 +116,8 @@ nm_team_link_watcher_new_ethtool (int delay_up, return NULL; } + NM_PRAGMA_WARNING_DISABLE("-Warray-bounds") + watcher = g_malloc (nm_offsetofend (NMTeamLinkWatcher, ethtool)); watcher->ref_count = 1; @@ -123,6 +125,8 @@ nm_team_link_watcher_new_ethtool (int delay_up, watcher->ethtool.delay_up = delay_up; watcher->ethtool.delay_down = delay_down; + NM_PRAGMA_WARNING_REENABLE + return watcher; }