../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(a)redhat.com>
Fixes: 9d15647dcb96831c93ac8c1d67c47265b5ed9072
---
Pushed as a build-breaker fix.
src/conf/domain_conf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7d177a5562..72ac4f4191 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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;
--
2.26.2
Show replies by date