summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared/nm-glib-aux/nm-macros-internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-macros-internal.h b/shared/nm-glib-aux/nm-macros-internal.h
index e76a3c251b..9062fe8d98 100644
--- a/shared/nm-glib-aux/nm-macros-internal.h
+++ b/shared/nm-glib-aux/nm-macros-internal.h
@@ -1657,11 +1657,13 @@ static inline char *
_nm_strndup_a_step (char *s, const char *str, gsize len)
{
NM_PRAGMA_WARNING_DISABLE ("-Wstringop-truncation");
+ NM_PRAGMA_WARNING_DISABLE ("-Wstringop-overflow");
if (len > 0)
strncpy (s, str, len);
s[len] = '\0';
return s;
NM_PRAGMA_WARNING_REENABLE;
+ NM_PRAGMA_WARNING_REENABLE;
}
/* Similar to g_strndup(), however, if the string (including the terminating