[rtems commit] score: Fix printk() format specifiers

Sebastian Huber sebh at rtems.org
Tue Jul 26 05:54:32 UTC 2016


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jul 26 07:54:05 2016 +0200

score: Fix printk() format specifiers

---

 cpukit/score/cpu/arm/arm_exc_handler_high.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/cpukit/score/cpu/arm/arm_exc_handler_high.c b/cpukit/score/cpu/arm/arm_exc_handler_high.c
index 27500f1..493d993 100644
--- a/cpukit/score/cpu/arm/arm_exc_handler_high.c
+++ b/cpukit/score/cpu/arm/arm_exc_handler_high.c
@@ -35,6 +35,8 @@
 #include <rtems/score/percpu.h>
 #include <rtems/score/cpu.h>
 
+#include <inttypes.h>
+
 #ifdef ARM_MULTILIB_ARCH_V4
 
 static void _defaultExcHandler (CPU_Exception_frame *ctx)
@@ -42,8 +44,9 @@ static void _defaultExcHandler (CPU_Exception_frame *ctx)
     printk("\n\r");
     printk("----------------------------------------------------------\n\r");
 #if 1
-    printk("Exception 0x%x caught at PC 0x%x by thread %d\n",
-           ctx->vector, ctx->register_lr - 4,
+    printk("Exception 0x%x caught at PC 0x%" PRIxPTR
+           " by thread 0x%" PRIx32 "\n",
+           ctx->vector, (uintptr_t) ctx->register_lr - 4,
            _Thread_Executing->Object.id);
 #endif
     printk("----------------------------------------------------------\n\r");




More information about the vc mailing list