Work around false positive gcc-11 diagnostic
This commit is contained in:
parent
d70a179e53
commit
d8981421df
15
libblockdev-gcc11.patch
Normal file
15
libblockdev-gcc11.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff --git a/src/plugins/kbd.c b/src/plugins/kbd.c
|
||||||
|
index a2908ec..97abd3b 100644
|
||||||
|
--- a/src/plugins/kbd.c
|
||||||
|
+++ b/src/plugins/kbd.c
|
||||||
|
@@ -732,6 +732,10 @@ static gboolean wait_for_file (const char *filename) {
|
||||||
|
*
|
||||||
|
* Tech category: %BD_KBD_TECH_BCACHE-%BD_KBD_TECH_MODE_CREATE
|
||||||
|
*/
|
||||||
|
+/* This triggers a known false positive warning in gcc-11. It's being
|
||||||
|
+ addressed upstream, but until the fix is available, this works around
|
||||||
|
+ the false positive. */
|
||||||
|
+__attribute__ ((optimize ("-O1")))
|
||||||
|
gboolean bd_kbd_bcache_create (const gchar *backing_device, const gchar *cache_device, const BDExtraArg **extra, const gchar **bcache_device, GError **error) {
|
||||||
|
const gchar *argv[6] = {"make-bcache", "-B", backing_device, "-C", cache_device, NULL};
|
||||||
|
gboolean success = FALSE;
|
@ -125,11 +125,12 @@
|
|||||||
|
|
||||||
Name: libblockdev
|
Name: libblockdev
|
||||||
Version: 2.24
|
Version: 2.24
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: A library for low-level manipulation with block devices
|
Summary: A library for low-level manipulation with block devices
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/storaged-project/libblockdev
|
URL: https://github.com/storaged-project/libblockdev
|
||||||
Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}-%{release}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}-%{release}/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: libblockdev-gcc11.patch
|
||||||
|
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
%if %{with_gi}
|
%if %{with_gi}
|
||||||
@ -680,6 +681,7 @@ A meta-package that pulls all the libblockdev plugins as dependencies.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -ivf
|
autoreconf -ivf
|
||||||
@ -983,6 +985,9 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
|
|||||||
%files plugins-all
|
%files plugins-all
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 19 2020 Jeff Law <law@redhat.com> - 2.24-4
|
||||||
|
- Work around gcc-11 false positive warning
|
||||||
|
|
||||||
* Mon Jul 27 2020 Hans de Goede <hdegoede@redhat.com> - 2.24-3
|
* Mon Jul 27 2020 Hans de Goede <hdegoede@redhat.com> - 2.24-3
|
||||||
- Change -mpath subpackage Requires: device-mapper-multipath into Recommends
|
- Change -mpath subpackage Requires: device-mapper-multipath into Recommends
|
||||||
- Related: rhbz#1857393
|
- Related: rhbz#1857393
|
||||||
|
Loading…
Reference in New Issue
Block a user