[rtems commit] shared/startup/panic.c: Fix printf() format warnings

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


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

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

shared/startup/panic.c: Fix printf() format warnings

---

 c/src/lib/libbsp/powerpc/shared/startup/panic.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/shared/startup/panic.c b/c/src/lib/libbsp/powerpc/shared/startup/panic.c
index 9b0aa75..b1a9268 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/panic.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/panic.c
@@ -8,6 +8,8 @@
 #include <rtems/score/percpu.h>
 #include <rtems/score/threaddispatch.h>
 
+#include <inttypes.h>
+
 static void
 rebootQuestion(void)
 {
@@ -60,12 +62,13 @@ void _BSP_Fatal_error(unsigned int v)
     printk("enabled\n");
   else
     printk(
-      "  Error occurred in a Thread Dispatching DISABLED context (level %i)\n",
+      "  Error occurred in a Thread Dispatching DISABLED"
+      "  context (level %" PRIu32 ")\n",
       _Thread_Dispatch_get_disable_level());
 
   if ( _ISR_Nest_level ) {
     printk(
-      "  Error occurred from ISR context (ISR nest level %i)\n",
+      "  Error occurred from ISR context (ISR nest level %" PRIu32 ")\n",
       _ISR_Nest_level
     );
   }




More information about the vc mailing list