[rtems commit] libcpu/../mpc5xx/.../vectors_init.c: Using inttype macros fixes 39 format warnings

Joel Sherrill joel at rtems.org
Fri Apr 7 20:57:22 UTC 2017


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

Author:    Cillian O'Donnell <cpodonnell8 at gmail.com>
Date:      Fri Apr  7 15:11:20 2017 +0100

libcpu/../mpc5xx/.../vectors_init.c: Using inttype macros fixes 39 format warnings

---

 .../libcpu/powerpc/mpc5xx/vectors/vectors_init.c   | 80 +++++++++++-----------
 1 file changed, 41 insertions(+), 39 deletions(-)

diff --git a/c/src/lib/libcpu/powerpc/mpc5xx/vectors/vectors_init.c b/c/src/lib/libcpu/powerpc/mpc5xx/vectors/vectors_init.c
index 4a6c5be..ff34a21 100644
--- a/c/src/lib/libcpu/powerpc/mpc5xx/vectors/vectors_init.c
+++ b/c/src/lib/libcpu/powerpc/mpc5xx/vectors/vectors_init.c
@@ -17,6 +17,7 @@
  *  found in the file LICENSE in this distribution or at
  *  http://www.rtems.org/license/LICENSE.
  */
+#include <inttypes.h>
 #include <rtems/bspIo.h>
 #include <libcpu/vectors.h>
 #include <libcpu/raw_exception.h>
@@ -32,45 +33,46 @@ void C_default_exception_handler(CPU_Exception_frame* excPtr)
 {
   int recoverable = 0;
 
-  printk("exception handler called for exception %d\n", excPtr->_EXC_number);
-  printk("\t Next PC or Address of fault = %x\n", excPtr->EXC_SRR0);
-  printk("\t Saved MSR = %x\n", excPtr->EXC_SRR1);
-  printk("\t R0 = %x\n", excPtr->GPR0);
-  printk("\t R1 = %x\n", excPtr->GPR1);
-  printk("\t R2 = %x\n", excPtr->GPR2);
-  printk("\t R3 = %x\n", excPtr->GPR3);
-  printk("\t R4 = %x\n", excPtr->GPR4);
-  printk("\t R5 = %x\n", excPtr->GPR5);
-  printk("\t R6 = %x\n", excPtr->GPR6);
-  printk("\t R7 = %x\n", excPtr->GPR7);
-  printk("\t R8 = %x\n", excPtr->GPR8);
-  printk("\t R9 = %x\n", excPtr->GPR9);
-  printk("\t R10 = %x\n", excPtr->GPR10);
-  printk("\t R11 = %x\n", excPtr->GPR11);
-  printk("\t R12 = %x\n", excPtr->GPR12);
-  printk("\t R13 = %x\n", excPtr->GPR13);
-  printk("\t R14 = %x\n", excPtr->GPR14);
-  printk("\t R15 = %x\n", excPtr->GPR15);
-  printk("\t R16 = %x\n", excPtr->GPR16);
-  printk("\t R17 = %x\n", excPtr->GPR17);
-  printk("\t R18 = %x\n", excPtr->GPR18);
-  printk("\t R19 = %x\n", excPtr->GPR19);
-  printk("\t R20 = %x\n", excPtr->GPR20);
-  printk("\t R21 = %x\n", excPtr->GPR21);
-  printk("\t R22 = %x\n", excPtr->GPR22);
-  printk("\t R23 = %x\n", excPtr->GPR23);
-  printk("\t R24 = %x\n", excPtr->GPR24);
-  printk("\t R25 = %x\n", excPtr->GPR25);
-  printk("\t R26 = %x\n", excPtr->GPR26);
-  printk("\t R27 = %x\n", excPtr->GPR27);
-  printk("\t R28 = %x\n", excPtr->GPR28);
-  printk("\t R29 = %x\n", excPtr->GPR29);
-  printk("\t R30 = %x\n", excPtr->GPR30);
-  printk("\t R31 = %x\n", excPtr->GPR31);
-  printk("\t CR = %x\n", excPtr->EXC_CR);
-  printk("\t CTR = %x\n", excPtr->EXC_CTR);
-  printk("\t XER = %x\n", excPtr->EXC_XER);
-  printk("\t LR = %x\n", excPtr->EXC_LR);
+  printk("exception handler called for exception %" PRIu32 "\n",
+         excPtr->_EXC_number);
+  printk("\t Next PC or Address of fault = %" PRIx32 "\n", excPtr->EXC_SRR0);
+  printk("\t Saved MSR = %" PRIx32 "\n", excPtr->EXC_SRR1);
+  printk("\t R0 = %" PRIx32 "\n", excPtr->GPR0);
+  printk("\t R1 = %" PRIx32 "\n", excPtr->GPR1);
+  printk("\t R2 = %" PRIx32 "\n", excPtr->GPR2);
+  printk("\t R3 = %" PRIx32 "\n", excPtr->GPR3);
+  printk("\t R4 = %" PRIx32 "\n", excPtr->GPR4);
+  printk("\t R5 = %" PRIx32 "\n", excPtr->GPR5);
+  printk("\t R6 = %" PRIx32 "\n", excPtr->GPR6);
+  printk("\t R7 = %" PRIx32 "\n", excPtr->GPR7);
+  printk("\t R8 = %" PRIx32 "\n", excPtr->GPR8);
+  printk("\t R9 = %" PRIx32 "\n", excPtr->GPR9);
+  printk("\t R10 = %" PRIx32 "\n", excPtr->GPR10);
+  printk("\t R11 = %" PRIx32 "\n", excPtr->GPR11);
+  printk("\t R12 = %" PRIx32 "\n", excPtr->GPR12);
+  printk("\t R13 = %" PRIx32 "\n", excPtr->GPR13);
+  printk("\t R14 = %" PRIx32 "\n", excPtr->GPR14);
+  printk("\t R15 = %" PRIx32 "\n", excPtr->GPR15);
+  printk("\t R16 = %" PRIx32 "\n", excPtr->GPR16);
+  printk("\t R17 = %" PRIx32 "\n", excPtr->GPR17);
+  printk("\t R18 = %" PRIx32 "\n", excPtr->GPR18);
+  printk("\t R19 = %" PRIx32 "\n", excPtr->GPR19);
+  printk("\t R20 = %" PRIx32 "\n", excPtr->GPR20);
+  printk("\t R21 = %" PRIx32 "\n", excPtr->GPR21);
+  printk("\t R22 = %" PRIx32 "\n", excPtr->GPR22);
+  printk("\t R23 = %" PRIx32 "\n", excPtr->GPR23);
+  printk("\t R24 = %" PRIx32 "\n", excPtr->GPR24);
+  printk("\t R25 = %" PRIx32 "\n", excPtr->GPR25);
+  printk("\t R26 = %" PRIx32 "\n", excPtr->GPR26);
+  printk("\t R27 = %" PRIx32 "\n", excPtr->GPR27);
+  printk("\t R28 = %" PRIx32 "\n", excPtr->GPR28);
+  printk("\t R29 = %" PRIx32 "\n", excPtr->GPR29);
+  printk("\t R30 = %" PRIx32 "\n", excPtr->GPR30);
+  printk("\t R31 = %" PRIx32 "\n", excPtr->GPR31);
+  printk("\t CR = %" PRIx32 "\n", excPtr->EXC_CR);
+  printk("\t CTR = %" PRIx32 "\n", excPtr->EXC_CTR);
+  printk("\t XER = %" PRIx32 "\n", excPtr->EXC_XER);
+  printk("\t LR = %" PRIx32 "\n", excPtr->EXC_LR);
   if (excPtr->_EXC_number == ASM_DEC_VECTOR)
        recoverable = 1;
   if (excPtr->_EXC_number == ASM_SYS_VECTOR)




More information about the vc mailing list