strace/gcc-11.patch

43 lines
1.2 KiB
Diff

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
diff --git a/mmsghdr.c b/mmsghdr.c
index 3fede19..5db35d8 100644
--- a/mmsghdr.c
+++ b/mmsghdr.c
@@ -78,6 +78,8 @@ static void
save_mmsgvec_namelen(struct tcb *const tcp, kernel_ulong_t addr,
unsigned int len, const char *const timeout)
{
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
if (len > IOV_MAX)
len = IOV_MAX;
@@ -99,6 +101,7 @@ save_mmsgvec_namelen(struct tcb *const tcp, kernel_ulong_t addr,
data->count = i;
set_tcb_priv_data(tcp, data, free_mmsgvec_data);
+#pragma GCC diagnostic pop
}
static void