From cbb3c63affc1792ade0433691aa67f0edad52b0b Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 9 Nov 2011 09:46:30 -0800 Subject: [PATCH] Fix some -Wformat errors in scanpci Signed-off-by: Jeremy Huddleston --- scanpci/scanpci.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scanpci/scanpci.c b/scanpci/scanpci.c index 219c814..1f5f8bd 100644 --- a/scanpci/scanpci.c +++ b/scanpci/scanpci.c @@ -29,6 +29,7 @@ #include #include #include +#include #ifdef HAVE_ERR_H #include @@ -51,19 +52,19 @@ static void print_pci_bridge( const struct pci_bridge_info * info ) { - printf( " Bus: primary=%02x, secondary=%02x, subordinate=%02x, " - "sec-latency=%u\n", + printf( " Bus: primary=%02"PRIx8", secondary=%02"PRIx8", subordinate=%02"PRIx8", " + "sec-latency=%"PRIu8"\n", info->primary_bus, info->secondary_bus, info->subordinate_bus, info->secondary_latency_timer ); - printf( " I/O behind bridge: %08x-%08x\n", + printf( " I/O behind bridge: %08"PRIx32"-%08"PRIx32"\n", info->io_base, info->io_limit ); - printf( " Memory behind bridge: %08x-%08x\n", + printf( " Memory behind bridge: %08"PRIx32"-%08"PRIx32"\n", info->mem_base, info->mem_limit ); - printf( " Prefetchable memory behind bridge: %08llx-%08llx\n", + printf( " Prefetchable memory behind bridge: %08"PRIx64"-%08"PRIx64"\n", info->prefetch_mem_base, info->prefetch_mem_limit ); } @@ -150,7 +151,7 @@ print_pci_device( struct pci_device * dev, int verbose ) pci_device_probe( dev ); for ( i = 0 ; i < 6 ; i++ ) { if ( dev->regions[i].base_addr != 0 ) { - printf( " BASE%u 0x%08x SIZE %d %s", + printf( " BASE%u 0x%08"PRIxPTR" SIZE %zu %s", i, (intptr_t) dev->regions[i].base_addr, (size_t) dev->regions[i].size, -- 2.7.4