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/rtems-fdt/rtems-fdt-shell.c | 4 ++-- cpukit/libmisc/shell/main_pci.c | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'cpukit/libmisc') diff --git a/cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c b/cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c index f2c4c10613..b15103e53d 100644 --- a/cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c +++ b/cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c @@ -486,7 +486,7 @@ rtems_fdt_shell_tst (int argc, char *argv[]) start = time (NULL); printf ("0x%08" PRIx32 " => (value & 0x%08" PRIx32 ") == 0x%08" PRIx32 \ - " for %" PRIu32 " seconds\n", + " for %ld seconds\n", address, mask, test, rtems_fdt_test_timeout); while ((time (NULL) - start) < rtems_fdt_test_timeout) @@ -533,7 +533,7 @@ rtems_fdt_shell_to (int argc, char *argv[]) if (argc == 1) { - printf ("timeout: %" PRIu32 " seconds\n", rtems_fdt_test_timeout); + printf ("timeout: %ld seconds\n", rtems_fdt_test_timeout); return 0; } 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