summaryrefslogtreecommitdiff
path: root/debian/patches/0004-gcc-11-warning.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0004-gcc-11-warning.patch')
-rw-r--r--debian/patches/0004-gcc-11-warning.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/patches/0004-gcc-11-warning.patch b/debian/patches/0004-gcc-11-warning.patch
new file mode 100644
index 0000000..da556f5
--- /dev/null
+++ b/debian/patches/0004-gcc-11-warning.patch
@@ -0,0 +1,22 @@
+Description: Disable warning in the cmpxchgl wrapper
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Origin: no # upstream is dead
+Bug-Debian: https://bugs.debian.org/984057
+Last-Update: 2022-10-16
+
+--- a/include/linux-i386/sysdep.h
++++ b/include/linux-i386/sysdep.h
+@@ -106,10 +106,13 @@
+ uint32_t prev;
+ struct xchg_dummy { uint32_t a[100]; };
+
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Warray-bounds"
+ asm volatile(LOCK_PREFIX "cmpxchgl %1,%2"
+ : "=a"(prev)
+ : "q"(new), "m"(*(struct xchg_dummy *)ptr), "0"(old)
+ : "memory");
++#pragma GCC diagnostic pop
+
+ return prev;
+ }