File: 0004-gcc-11-warning.patch

package info (click to toggle)
infinipath-psm 3.3%2B20.604758e7-6.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,508 kB
  • sloc: ansic: 34,260; makefile: 359; asm: 47; sh: 18
file content (22 lines) | stat: -rw-r--r-- 633 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
 }