[rtems commit] shared/bootloader/mm.c: Fix printf() format warnings

Joel Sherrill joel at rtems.org
Mon Apr 24 22:21:55 UTC 2017


Module:    rtems
Branch:    master
Commit:    31908b124f5b94c88625d931ab71a23f453d602d
Changeset: http://git.rtems.org/rtems/commit/?id=31908b124f5b94c88625d931ab71a23f453d602d

Author:    Joel Sherrill <joel at rtems.org>
Date:      Sun Apr 23 20:05:12 2017 -0500

shared/bootloader/mm.c: Fix printf() format warnings

---

 c/src/lib/libbsp/powerpc/shared/bootloader/mm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/mm.c b/c/src/lib/libbsp/powerpc/shared/bootloader/mm.c
index c3203c6..ea3cdde 100644
--- a/c/src/lib/libbsp/powerpc/shared/bootloader/mm.c
+++ b/c/src/lib/libbsp/powerpc/shared/bootloader/mm.c
@@ -210,12 +210,14 @@ void _handler(int vec, ctxt *p) {
 		}
 	} else {
 	  MMUon();
-	  printk("\nPanic: vector=%x, dsisr=%lx, faultaddr =%lx, msr=%lx opcode=%lx\n", vec,
+	  printk(
+		"\nPanic: vector=%d, dsisr=%lx, faultaddr =%lx, "
+		  "msr=%lx opcode=%x\n", vec,
 		 cause, p->nip, p->msr, * ((unsigned int*) p->nip) );
 	  if (vec == 7) {
 	    unsigned int* ptr = ((unsigned int*) p->nip) - 4 * 10;
 	    for (; ptr <= (((unsigned int*) p->nip) + 4 * 10); ptr ++)
-	      printk("Hexdecimal code at address %x = %x\n", ptr, *ptr);
+	      printk("Hexdecimal code at address %p = %x\n", ptr, *ptr);
 	  }
 	  hang("Program or alignment exception at ", vaddr, p);
 	}




More information about the vc mailing list