[PATCH 10/11] rijndael-ppc: fix 'may be used uninitialized' warnings

Jussi Kivilinna <[email protected]>
Newsgroups gmane.comp.encryption.gpg.libgcrypt.devel
Message-ID <[email protected]>
* cipher/rijndael-ppc-common.h (PRELOAD_ROUND_KEYS_ALL): Load
rkey10-rkey13 with zero value by default.
--

Signed-off-by: Jussi Kivilinna <[email protected]>
---
 cipher/rijndael-ppc-common.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cipher/rijndael-ppc-common.h b/cipher/rijndael-ppc-common.h
index fc8ee526..bd2ad8b1 100644
--- a/cipher/rijndael-ppc-common.h
+++ b/cipher/rijndael-ppc-common.h
@@ -136,6 +136,7 @@ typedef union
 
 #define PRELOAD_ROUND_KEYS_ALL(nrounds) \
   do { \
+    static const block preload_zero = { 0 }; \
     rkey0 = ALIGNED_LOAD (rk, 0); \
     rkey1 = ALIGNED_LOAD (rk, 1); \
     rkey2 = ALIGNED_LOAD (rk, 2); \
@@ -146,6 +147,10 @@ typedef union
     rkey7 = ALIGNED_LOAD (rk, 7); \
     rkey8 = ALIGNED_LOAD (rk, 8); \
     rkey9 = ALIGNED_LOAD (rk, 9); \
+    rkey10 = preload_zero; \
+    rkey11 = preload_zero; \
+    rkey12 = preload_zero; \
+    rkey13 = preload_zero; \
     if (nrounds >= 12) \
       { \
 	rkey10 = ALIGNED_LOAD (rk, 10); \
-- 
2.45.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.