From nobody Thu May 16 11:17:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1621506122; cv=none; d=zohomail.com; s=zohoarc; b=Bvao70XBCj1jaTDYGOOhEGBSeiL0M/TzoiDCwPH23FMbtxl8iRumFeezeell4ikELLo+CkYF5Kug8EPJBpoI45xqm17iWpfWAs+Zkvg81/izEe5cirFJzTDxa+qqze4f7uSryjFsLaL1lW7KgXDZjcOhgptzuiO5w3tujXWYazU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621506122; 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=GIRlk9I39zGFoXpScqv4acGYcVBSUYQlXWEfTfStpXk=; b=E7ooI8b77qD+a3sA1Ctgloz1W+cnAFCSzXE6ufyAT+P+w5FrbsYbqSnMwQv3SZ1KAMGQLsuTrkBRNUeZDu437dfrwQS6mPbyEL2V4s8Zi+ZUHQB3q3rsP2Hl1c9kz8cg2XlS7gEb/ohpJeMuVaQ7XOrOBJsniwtU3/O0bOnGy5E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1621506122063360.5093418962688; Thu, 20 May 2021 03:22:02 -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-509-GC7l5YsSMzOJnVZcmKKiSw-1; Thu, 20 May 2021 06:21:58 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C39A5107ACF5; Thu, 20 May 2021 10:21:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A2A5A60BD9; Thu, 20 May 2021 10:21:52 +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 46D12180B465; Thu, 20 May 2021 10:21:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14KAIpkF018808 for ; Thu, 20 May 2021 06:18:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id E5FAF60C03; Thu, 20 May 2021 10:18:51 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4EE7360D54 for ; Thu, 20 May 2021 10:18:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621506120; 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=GIRlk9I39zGFoXpScqv4acGYcVBSUYQlXWEfTfStpXk=; b=PKheb/bZIni/DyiEehVWQIuNImULZ9RsgU8WVpLmq1fPCfqgRMeO8kLx5fYk7OGlFjbvqT JFGHHmTeg1XXTLGAEL3TJf6ewjbdpLp1Loa1lxsAFGWPifpNlbNGXHB7XNXWrdjOcgcDpX eFdjbqA9EdwTuxGwJX1jiReM2tqeqYc= X-MC-Unique: GC7l5YsSMzOJnVZcmKKiSw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] conf: node_device: Fix build with clang Date: Thu, 20 May 2021 12:18:46 +0200 Message-Id: <7eb281f91c8753852d0b1c5a01502736e5b75f00.1621505902.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Clang complains: ../libvirt/src/conf/node_device_conf.c:1945:74: error: result of comparis= on of unsigned enum expression < 0 is always false [-Werror,-Wtautological-= unsigned-enum-zero-compare] if ((mdev->start =3D virNodeDevMdevStartTypeFromString(starttype)) = < 0) { Fixes: 42a55854993 Signed-off-by: Peter Krempa --- src/conf/node_device_conf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Pushed as fix for a build-breaker. diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 4e2b37c612..5598d420fe 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -1942,11 +1942,14 @@ virNodeDevCapMdevParseXML(xmlXPathContextPtr ctxt, } if ((starttype =3D virXPathString("string(./start[1]/@type)", ctxt))) { - if ((mdev->start =3D virNodeDevMdevStartTypeFromString(starttype))= < 0) { + int tmp; + if ((tmp =3D virNodeDevMdevStartTypeFromString(starttype)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown mdev start type '%s' for '%s'"), sta= rttype, def->name); return -1; } + + mdev->start =3D tmp; } else { mdev->start =3D VIR_NODE_DEV_MDEV_START_MANUAL; } --=20 2.31.1