Skip to contentSkip to conversation

Fix format string warning in arch/powerpc/boot/main.c

PATCH Superseded Jon Smirl 2 participants 2 messages Oct 31, 2008 PowerPC

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jon Smirl

author
#0 lore raw

PATCH 1/1 Fix format string warning in arch/powerpc/boot/main.c

Fix format string warning in arch/powerpc/boot/main.c

BOOTCC arch/powerpc/boot/main.o
arch/powerpc/boot/main.c: In function 'prep_kernel':
arch/powerpc/boot/main.c:65: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'

---
 arch/powerpc/boot/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/boot/main.c +1 -1
index ae32801..5afa1d4 100644
@@ -63,7 +63,7 @@ static struct addr_range prep_kernel(void)
 		 */
 		if ((unsigned long)_start < ei.loadsize)
 			fatal("Insufficient memory for kernel at address 0!"
-			       " (_start=%p, uncomressed size=%08x)\n\r",
+			       " (_start=%p, uncomressed size=%08lx)\n\r",
 			       _start, ei.loadsize);
 
 		if ((unsigned long)_end < ei.memsize)
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jon Smirl

Fix format string warning in arch/powerpc/boot/main.c

BOOTCC arch/powerpc/boot/main.o
arch/powerpc/boot/main.c: In function 'prep_kernel':
arch/powerpc/boot/main.c:65: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'

Quoted 9 lines
---
 arch/powerpc/boot/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/boot/main.c +0 -0
index ae32801..5afa1d4 100644

arch/powerpc/boot/main.c static struct addr_range prep_kernel(void) · line 66

Quoted 5 lines
arch/powerpc/boot/main.c +1 -1
@@ -63,7 +63,7 @@ static struct addr_range prep_kernel(void)
 		 */
 		if ((unsigned long)_start < ei.loadsize)
 			fatal("Insufficient memory for kernel at address 0!"
-			       " (_start=%p, uncomressed size=%08x)\n\r",
+			       " (_start=%p, uncomressed size=%08lx)\n\r",

Hrm.. of course.. that leaves the typo "uncomressed". Apparently I was having a bad day when I wrote that statement :-/.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson