mirror of https://gitee.com/openkylin/libvirt.git
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: 9d15647dcb
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…
Reference in New Issue