[PATCH:libpciaccess 1/2] Define PCI_MATCH_ANY as an unsigned int
Alan Coopersmith
alan.coopersmith at oracle.com
Mon Jun 24 21:22:04 PDT 2013
Clears a bunch of clang warnings of the forms:
common_device_name.c:345:23: warning: comparison of integers of different signs:
'const uint32_t' (aka 'const unsigned int') and 'int' [-Wsign-compare]
if ( m->vendor_id == PCI_MATCH_ANY ) {
~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
common_device_name.c:498:19: warning: implicit conversion changes signedness:
'int' to 'uint32_t' (aka 'unsigned int') [-Wsign-conversion]
m.device_id = PCI_MATCH_ANY;
~ ^~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
include/pciaccess.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/pciaccess.h b/include/pciaccess.h
index c457424..22faf89 100644
--- a/include/pciaccess.h
+++ b/include/pciaccess.h
@@ -178,7 +178,7 @@ int pci_device_cfg_write_bits(struct pci_device *dev, uint32_t mask,
/*@}*/
-#define PCI_MATCH_ANY (~0)
+#define PCI_MATCH_ANY (~0U)
/**
* Compare two PCI ID values (either vendor or device). This is used
--
1.7.9.2
More information about the xorg-devel
mailing list