diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2025-06-06 10:05:27 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2025-06-06 10:05:27 +0000 |
commit | 43904a02caeb311a505bbb5ffa431ea9859db5f4 (patch) | |
tree | cd841d75f639d9092243b0d02a3bb93cbdea5804 /debian/patches/openbios-array-bounds-gcc12.patch | |
parent | Adding upstream version 1:7.2+dfsg. (diff) | |
download | qemu-debian.tar.xz qemu-debian.zip |
Adding debian version 1:7.2+dfsg-7+deb12u13.debian/1%7.2+dfsg-7+deb12u13debian
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'debian/patches/openbios-array-bounds-gcc12.patch')
-rw-r--r-- | debian/patches/openbios-array-bounds-gcc12.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/patches/openbios-array-bounds-gcc12.patch b/debian/patches/openbios-array-bounds-gcc12.patch new file mode 100644 index 00000000..a96048b1 --- /dev/null +++ b/debian/patches/openbios-array-bounds-gcc12.patch @@ -0,0 +1,25 @@ +Subject: openbios: do not error-out array-bounds warning +From: Michael Tokarev <mjt@tls.msk.ru> +Date: Fri, 02 Sep 2022 18:35:30 +0300 + +gcc-12.2 produces an apparently wrong warning for this file: + +roms/openbios/arch/ppc/qemu/init.c:400:10: error: \ + array subscript 0 is outside array bounds of ‘uint32_t[0]’ {aka ‘unsigned int[]’} \ + [-Werror=array-bounds] + 400 | *dsi = 0x48002002; + | =====^=========== + +Turn this particular -Werror back into warning. Gcc is apparently wrong here. + +index e40385a70b..2e214aa079 100644 +--- a/roms/openbios/arch/ppc/qemu/init.c ++++ b/roms/openbios/arch/ppc/qemu/init.c +@@ -397,4 +397,7 @@ ppc64_patch_handlers(void) + uint32_t *isi = (uint32_t *)0x400UL; + ++#pragma GCC diagnostic warning "-Warray-bounds" ++/* gcc-12 misreports array-bounds error in the following two assignments: */ ++ + // Patch the first DSI handler instruction to: ba 0x2000 + *dsi = 0x48002002; |