SHA256
1
0
forked from pool/qemu
qemu/help-compiler-out-by-initializing-array.patch
Bruce Rogers 607fbaf071 Accepting request 827680 from home:bfrogers:branches:Virtualization
- Fix compilation errors seen with pre-release gcc 11
  atomic.h-change-method-for-removing-C-qu.patch
  help-compiler-out-by-initializing-array.patch
  s390x-Fix-stringop-truncation-issue-repo.patch

(also tweak needed to previous submission)
(also minor tweak to update_git.sh, which is needed to correctly handle the state of git repo sitting on actual release commit.

OBS-URL: https://build.opensuse.org/request/show/827680
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=560
2020-08-18 20:41:08 +00:00

28 lines
1.1 KiB
Diff

From: Bruce Rogers <brogers@suse.com>
Date: Thu, 13 Aug 2020 18:23:35 -0600
Subject: help compiler out by initializing array
The pre-release gcc 11 compiler is complaining that result_raw in
bigint_test_exec is flagged as possibly being uninitialized when used
(-Werror=maybe-uninitialized). Help the compiler by initializing the
array.
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
src/tests/bigint_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/roms/ipxe/src/tests/bigint_test.c b/roms/ipxe/src/tests/bigint_test.c
index 8d40c3188784a693e83a2a9d3217..dfcd393c413b1c66ab2e9988c472 100644
--- a/roms/ipxe/src/tests/bigint_test.c
+++ b/roms/ipxe/src/tests/bigint_test.c
@@ -210,7 +210,7 @@ void bigint_mod_exp_sample ( const bigint_element_t *base0,
static const uint8_t addend_raw[] = addend; \
static const uint8_t value_raw[] = value; \
static const uint8_t expected_raw[] = expected; \
- uint8_t result_raw[ sizeof ( expected_raw ) ]; \
+ uint8_t result_raw[ sizeof ( expected_raw ) ] = {0}; \
unsigned int size = \
bigint_required_size ( sizeof ( value_raw ) ); \
bigint_t ( size ) addend_temp; \