[rtems commit] score/cpu/or1k/or1k-exception-frame-print.c: Fix printf() format warning

Joel Sherrill joel at rtems.org
Tue Apr 25 23:14:15 UTC 2017


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

Author:    Joel Sherrill <joel at rtems.org>
Date:      Tue Apr 25 20:01:41 2017 -0500

score/cpu/or1k/or1k-exception-frame-print.c: Fix printf() format warning

---

 cpukit/score/cpu/or1k/or1k-exception-frame-print.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cpukit/score/cpu/or1k/or1k-exception-frame-print.c b/cpukit/score/cpu/or1k/or1k-exception-frame-print.c
index 75e169c..6dd1ee4 100644
--- a/cpukit/score/cpu/or1k/or1k-exception-frame-print.c
+++ b/cpukit/score/cpu/or1k/or1k-exception-frame-print.c
@@ -12,11 +12,13 @@
 
 #include <rtems/score/cpu.h>
 #include <rtems/bspIo.h>
+#include <inttypes.h>
 
 void _CPU_Exception_frame_print( const CPU_Exception_frame *frame )
 {
-  uint32_t i;
+  int i;
+
   for ( i = 0; i < 32; ++i ) {
-      printk( "r%02i = 0x%016x\n",i, frame->r[i]);
+      printk( "r%02i = 0x%016" PRIx32 "\n",i, frame->r[i]);
   }
 }




More information about the vc mailing list