From 3773eea8d4e22aaedf675051e5e96af53b925152 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 6 Jul 2013 09:56:46 -0700 Subject: [PATCH] pci_device_solx_devfs_read: fix sign conversion/comparison warnings Fixes: solx_devfs.c:824:19: warning: comparison of integers of different signs: 'int' and 'pciaddr_t' (aka 'unsigned long') [-Wsign-compare] for (i = 0; i < size; i += PCITOOL_ACC_ATTR_SIZE(PCITOOL_ACC_ATTR_SIZE_1)) ~ ^ ~~~~ solx_devfs.c:826:28: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] cfg_prg.offset = offset + i; ~ ^ solx_devfs.c:844:19: warning: implicit conversion changes signedness: 'int' to 'pciaddr_t' (aka 'unsigned long') [-Wsign-conversion] *bytes_read = i; ~ ^ Signed-off-by: Alan Coopersmith --- src/solx_devfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solx_devfs.c b/src/solx_devfs.c index 433969f..df64e71 100644 --- a/src/solx_devfs.c +++ b/src/solx_devfs.c @@ -802,7 +802,7 @@ pci_device_solx_devfs_read( struct pci_device * dev, void * data, { pcitool_reg_t cfg_prg; int err = 0; - int i = 0; + unsigned int i = 0; nexus_t *nexus; nexus = find_nexus_for_bus(dev->domain, dev->bus); -- 2.11.0