From e39d3424e329308d9e02b6df774f706a007ffd30 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 11 Nov 2019 13:03:14 +0100 Subject: [PATCH] util: pci: Remove always-false condition Commit d19c21429fd modified the condition so that it checks whether the value is more than 0xFFFFFFFF. Since addr->domain is an unsigned int, it will never be more than that. Remove the whole check src/util/virpci.c:1291:22: error: result of comparison 'unsigned int' > 4294967295 is always false [-Werror,-Wtautological-type-limit-compare] if (addr->domain > 0xFFFFFFFF) { ~~~~~~~~~~~~ ^ ~~~~~~~~~~ Signed-off-by: Peter Krempa --- src/util/virpci.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index f9e39e79d8..cd560d683b 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1288,14 +1288,6 @@ bool virPCIDeviceAddressIsValid(virPCIDeviceAddressPtr addr, bool report) { - if (addr->domain > 0xFFFFFFFF) { - if (report) - virReportError(VIR_ERR_XML_ERROR, - _("Invalid PCI address domain='0x%x', " - "must be <= 0xFFFF"), - addr->domain); - return false; - } if (addr->bus > 0xFF) { if (report) virReportError(VIR_ERR_XML_ERROR,