From nobody Sun May 5 22:56:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1598996093; cv=none; d=zohomail.com; s=zohoarc; b=daJ5lcIrvTPjc2LbOqU1QiuDA6c0MClVuYTCvVHOxHgO06AZqv7Z2K26zUd71y7vEMHHNLfn6Th2p3Cji/1/nwZBHTzc1Klc8ukAwxXBu3wudQRrYZLvc41rmzhsu8iN4qiwxuF335bu50qU88XwUod41vJ/jZY1MEen9sfFFX0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598996093; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=D1orJfpOgnGoRaqMngVy/GEoPqMqCIzbLvU5ZxxQ7oM=; b=TAHaNN3tj/Gv55plTpkBZe6C4rVk7W35cFIvvuGxf3mLJ6DeY4RB4QAn70TF3pY+X0PAGUQNqNDRRRNeF7f7kZMA6mvRkizolvA7B6YbfUwYgfPX6kvH0PtlPoF7ThkIgRcIz5a+4uaPax1k+YhI++ICfUzQZgEYItQGbIvxzTg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1598996093203529.6233740871401; Tue, 1 Sep 2020 14:34:53 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-387-WGT-t0VMMu-W1-2FQGy19w-1; Tue, 01 Sep 2020 17:34:47 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 287C18015C5; Tue, 1 Sep 2020 21:34:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C84078B29; Tue, 1 Sep 2020 21:34:39 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C24337A2F3; Tue, 1 Sep 2020 21:34:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 081LYaQQ002557 for ; Tue, 1 Sep 2020 17:34:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id E7FEA78B55; Tue, 1 Sep 2020 21:34:36 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37B4978B52 for ; Tue, 1 Sep 2020 21:34:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598996089; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=D1orJfpOgnGoRaqMngVy/GEoPqMqCIzbLvU5ZxxQ7oM=; b=XWUFN5clAt8w4vy2FGYpagbAvYxuITAVQzp4vmEzbkOgi4cMZYLHm6JJAb+/N0DHfwe5Q4 kzxdMXV4eWI4vJTpcPzoLp2kE7HAZ2cryteKbMsTpY00l9Rmoc1nc0O9Sfmxk8v4aB3qW5 Z+jzS7/n9oFoEP96AZTi2xMlIx3K0AM= X-MC-Unique: WGT-t0VMMu-W1-2FQGy19w-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH] conf: fix enum conversion Date: Tue, 1 Sep 2020 23:34:30 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) ../src/conf/domain_conf.c:8144:78: error: result of comparison of unsigned = enum expression < 0 is always false [-Werror,-Wtautological-unsigned-enum-z= ero-compare] if ((def->writeFiltering =3D virTristateBoolTypeFromString(filterin= g)) < 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~ ^ ~ Signed-off-by: J=C3=A1n Tomko 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 nod= e, xmlNodePtr cur; =20 if ((filtering =3D virXMLPropString(node, "writeFiltering"))) { - if ((def->writeFiltering =3D virTristateBoolTypeFromString(filteri= ng)) < 0) { + int val; + if ((val =3D virTristateBoolTypeFromString(filtering)) < 0) { virReportError(VIR_ERR_XML_ERROR, _("unknown pci writeFiltering setting '%s'"), filtering); return -1; } + def->writeFiltering =3D val; } =20 cur =3D node->children; --=20 2.26.2