[PATCH 4/4] purgatory/ppc64: Fix uninitialized warning

Geoff Levand geoff at infradead.org
Wed Apr 11 10:03:11 PDT 2018


Fixes warnings like these when building kexec for powerpc (32 bit):

  console-ppc64.c: warning: ‘*((void *)&buff+8)’ may be used uninitialized

Signed-off-by: Geoff Levand <geoff at infradead.org>
---
 purgatory/arch/ppc64/console-ppc64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/purgatory/arch/ppc64/console-ppc64.c b/purgatory/arch/ppc64/console-ppc64.c
index b80183c..2403312 100644
--- a/purgatory/arch/ppc64/console-ppc64.c
+++ b/purgatory/arch/ppc64/console-ppc64.c
@@ -29,7 +29,7 @@ extern int debug;
 
 void putchar(int c)
 {
-	char buff[16];
+	char buff[16] = "";
 	unsigned long *lbuf = (unsigned long *)buff;
 
 	if (!debug) /* running on non pseries */
-- 
2.14.1




More information about the kexec mailing list