Work around gcc-11 false positive diagnostic
This commit is contained in:
parent
5459233e94
commit
5cf517f608
21
gcc-11.patch
Normal file
21
gcc-11.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
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
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Tracks and displays system calls associated with a running process
|
Summary: Tracks and displays system calls associated with a running process
|
||||||
Name: strace
|
Name: strace
|
||||||
Version: 5.8
|
Version: 5.8
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
# The test suite is GPLv2+, all the rest is LGPLv2.1+.
|
# The test suite is GPLv2+, all the rest is LGPLv2.1+.
|
||||||
License: LGPL-2.1+ and GPL-2.0+
|
License: LGPL-2.1+ and GPL-2.0+
|
||||||
# Some distros require Group tag to be present,
|
# Some distros require Group tag to be present,
|
||||||
@ -18,6 +18,7 @@ BuildRequires: xz
|
|||||||
%else
|
%else
|
||||||
Source: strace-%{version}.tar.gz
|
Source: strace-%{version}.tar.gz
|
||||||
%endif
|
%endif
|
||||||
|
Patch0: gcc-11.patch
|
||||||
BuildRequires: gcc gzip
|
BuildRequires: gcc gzip
|
||||||
|
|
||||||
# Install Bluetooth headers for AF_BLUETOOTH sockets decoding.
|
# Install Bluetooth headers for AF_BLUETOOTH sockets decoding.
|
||||||
@ -51,6 +52,7 @@ received by a process.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
echo -n %version-%release > .tarball-version
|
echo -n %version-%release > .tarball-version
|
||||||
echo -n 2020 > .year
|
echo -n 2020 > .year
|
||||||
echo -n 2020-06-16 > .strace.1.in.date
|
echo -n 2020-06-16 > .strace.1.in.date
|
||||||
@ -100,6 +102,9 @@ echo 'END OF TEST SUITE INFORMATION'
|
|||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 19 2020 Jeff Law <law@redhat.com> - 5.8-2
|
||||||
|
- Work around gcc-11 false positive diagnostic
|
||||||
|
|
||||||
* Thu Aug 06 2020 Dmitry V. Levin <ldv@altlinux.org> - 5.8-1
|
* Thu Aug 06 2020 Dmitry V. Levin <ldv@altlinux.org> - 5.8-1
|
||||||
- v5.7 -> v5.8.
|
- v5.7 -> v5.8.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user