From 9c12bcfdc52d7887c26d97bfcb8eb5fc86f2bc1a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 7 Jan 2019 09:32:16 +0100 Subject: Fix format warnings --- cpukit/libmisc/shell/main_pci.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'cpukit/libmisc/shell') diff --git a/cpukit/libmisc/shell/main_pci.c b/cpukit/libmisc/shell/main_pci.c index 57a6e9b542..08fdae78ae 100644 --- a/cpukit/libmisc/shell/main_pci.c +++ b/cpukit/libmisc/shell/main_pci.c @@ -12,6 +12,7 @@ #include "config.h" #endif +#include #include #include #include @@ -136,7 +137,8 @@ static int shell_pci_rX( case 4: result = pci_cfg_r32(pciid, offset, &data32); if (result == PCISTS_OK) - printf(" r32[0x%02x]: 0x%08lx DEC=%lu\n", offset, data32, data32); + printf(" r32[0x%02x]: 0x%08" PRIx32 " DEC=%" PRIu32 "\n", + offset, data32, data32); break; default: @@ -177,7 +179,8 @@ static int shell_pci_wX( case 4: result = pci_cfg_w32(pciid, offset, data); if (result == PCISTS_OK) - printf(" w32[0x%02x]: 0x%08lx DEC=%lu\n", offset, data, data); + printf(" w32[0x%02x]: 0x%08" PRIx32 " DEC=%" PRIu32 "\n", + offset, data, data); break; default: @@ -362,8 +365,8 @@ static int shell_pci_infodev( printf(" DEVICE: 0x%04x\n", dev->device); printf(" SUB VENDOR: 0x%04x\n", dev->subvendor); printf(" SUB DEVICE: 0x%04x\n", dev->subdevice); - printf(" CLASS: 0x%06lx\n", dev->classrev >> 8); - printf(" REVISION: 0x%02lx\n", dev->classrev & 0xff); + printf(" CLASS: 0x%06" PRIx32 "\n", dev->classrev >> 8); + printf(" REVISION: 0x%02" PRIx32 "\n", dev->classrev & 0xff); printf(" IRQ: %d\n", dev->sysirq); res_avail = 0; @@ -387,7 +390,8 @@ static int shell_pci_infodev( continue; } - printf(" %s[%d]: %08lx-%08lx\n", str1, i, res->start, res->end - 1); + printf(" %s[%d]: %08" PRIx32 "-%08" PRIx32 "\n", + str1, i, res->start, res->end - 1); } if (res_avail == 0) -- cgit v1.2.3