strace/gcc-11.patch

22 lines
654 B
Diff
Raw Normal View History

diff --git a/tests/nlattr_tcamsg.c b/tests/nlattr_tcamsg.c
index e25e32a..d23715c 100644
--- a/tests/nlattr_tcamsg.c
+++ b/tests/nlattr_tcamsg.c
@@ -33,6 +33,8 @@ enum { TCA_ACT_USED_HW_STATS = 9 };
static void
init_tcamsg(struct nlmsghdr *const nlh, const unsigned int msg_len)
{
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
SET_STRUCT(struct nlmsghdr, nlh,
.nlmsg_len = msg_len,
.nlmsg_type = RTM_GETACTION,
@@ -43,6 +45,7 @@ init_tcamsg(struct nlmsghdr *const nlh, const unsigned int msg_len)
SET_STRUCT(struct tcamsg, msg,
.tca_family = AF_INET
);
+#pragma GCC diagnostic pop
}
static void