mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
conf: fix enum conversion
../src/conf/domain_conf.c:8144:78: error: result of comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-unsigned-enum-zero-compare] if ((def->writeFiltering = virTristateBoolTypeFromString(filtering)) < 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ Signed-off-by: Ján Tomko <jtomko@redhat.com> Fixes: 9d15647dcb96831c93ac8c1d67c47265b5ed9072
This commit is contained in:
parent
cec43376fb
commit
e603fcf537
@ -8141,12 +8141,14 @@ virDomainHostdevSubsysPCIDefParseXML(xmlNodePtr node,
|
||||
xmlNodePtr cur;
|
||||
|
||||
if ((filtering = virXMLPropString(node, "writeFiltering"))) {
|
||||
if ((def->writeFiltering = virTristateBoolTypeFromString(filtering)) < 0) {
|
||||
int val;
|
||||
if ((val = virTristateBoolTypeFromString(filtering)) < 0) {
|
||||
virReportError(VIR_ERR_XML_ERROR,
|
||||
_("unknown pci writeFiltering setting '%s'"),
|
||||
filtering);
|
||||
return -1;
|
||||
}
|
||||
def->writeFiltering = val;
|
||||
}
|
||||
|
||||
cur = node->children;
|
||||
|
Loading…
x
Reference in New Issue
Block a user