[rtems commit] bsps/powerpc: Fix warnings

Sebastian Huber sebh at rtems.org
Wed Feb 15 12:51:47 UTC 2017


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Feb 15 13:28:02 2017 +0100

bsps/powerpc: Fix warnings

---

 c/src/lib/libbsp/powerpc/mvme3100/pci/detect_host_bridge.c | 2 +-
 c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c       | 3 ++-
 c/src/lib/libbsp/powerpc/shared/pci/generic_clear_hberrs.c | 2 +-
 c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.c            | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/mvme3100/pci/detect_host_bridge.c b/c/src/lib/libbsp/powerpc/mvme3100/pci/detect_host_bridge.c
index a1f6f2d..8488c99 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/pci/detect_host_bridge.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/pci/detect_host_bridge.c
@@ -100,7 +100,7 @@ dump_dev_cb(
 	pci_read_config_byte (bus, dev, fun, PCI_INTERRUPT_LINE, &il);
 	pci_read_config_byte (bus, dev, fun, PCI_INTERRUPT_PIN,  &ip);
 
-    printk("%3d:0x%02x:%d    0x%04x-0x%04x:  0x%04x 0x%04x 0x%08x 0x%08x       %d -> %3d (=0x%02x)\n",
+    printk("%3d:0x%02x:%d    0x%04x-0x%04x:  0x%04x 0x%04x 0x%08" PRIx32 " 0x%08" PRIx32 "       %d -> %3d (=0x%02x)\n",
 		bus, dev, fun, vi, di, cd, st, b1, b2, ip, il, il);
 	return 0;
 }
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
index 6ab2864..41edaf5 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
@@ -18,6 +18,7 @@
 
 #include <string.h>
 #include <stdlib.h>
+#include <inttypes.h>
 
 #include <rtems.h>
 #include <bsp.h>
@@ -271,7 +272,7 @@ VpdBufRec          vpdData [] = {
 
 #ifdef SHOW_MORE_INIT_SETTINGS
   printk("Additionnal boot options are %s\n", BSP_commandline_string);
-  printk("Initial system stack at %x\n",      stack);
+  printk("Initial system stack at %" PRIxPTR "\n", (uintptr_t) stack);
   printk("Software IRQ stack starts at %x with size %u\n", intrStackStart, intrStackSize);
 #endif
 
diff --git a/c/src/lib/libbsp/powerpc/shared/pci/generic_clear_hberrs.c b/c/src/lib/libbsp/powerpc/shared/pci/generic_clear_hberrs.c
index 058f179..1bc4009 100644
--- a/c/src/lib/libbsp/powerpc/shared/pci/generic_clear_hberrs.c
+++ b/c/src/lib/libbsp/powerpc/shared/pci/generic_clear_hberrs.c
@@ -47,7 +47,7 @@ int             count;
     } while ( ! PCI_STATUS_OK(pcistat) && count-- );
 
     if ( !PCI_STATUS_OK(rval) && !quiet) {
-        printk("Cleared PCI errors: pci_stat was 0x%04x\n", rval);
+        printk("Cleared PCI errors: pci_stat was 0x%04lx\n", rval);
     }
     if ( !PCI_STATUS_OK(pcistat) ) {
         printk("Unable to clear PCI errors: still 0x%04x after 10 attempts\n", pcistat);
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.c b/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.c
index 5f46de7..5d6e174 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.c
+++ b/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.c
@@ -1561,7 +1561,7 @@ int					lvl;
 			if ( !(ip=irqHdlTbl[vector])) {
 				/* TODO: log error message - RTEMS has no logger :-( */
 				vmeTsi148IntDisable(lvl);
-				printk("vmeTsi148 ISR: ERROR: no handler registered (level %i) IACK 0x%08x -- DISABLING level %i\n",
+				printk("vmeTsi148 ISR: ERROR: no handler registered (level %i) IACK 0x%08lx -- DISABLING level %i\n",
 						lvl, vector, lvl);
 			} else {
 				/* dispatch handler, it must clear the IRQ at the device */



More information about the vc mailing list