File help-compiler-out-by-initializing-array.patch of Package qemu.22426

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;					\
openSUSE Build Service is sponsored by