From nobody Mon Feb 9 04:14:00 2026 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=1612183372; cv=none; d=zohomail.com; s=zohoarc; b=Ah/g7mDfwLEkq2q6/foQ1/6Ue5+9m21GQDtv6Q46X758vNQHc8XKt3xUznsWTFQBHfIMVUYWe/EC90YWcUXIlrdkUyU6g+O2ldzK72JGu6/G/9X/PV5E/vYpgGnIDq1YY1HRcC2xVwqIshJ5VMB1EZkivDOeWfeGsEx17vWcXRc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612183372; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=p53PxZNtm9H1yE/Hs2qjKSE6fjXfHCX+8XCMAI+k5gU=; b=MFM6kL20G0R5h4ssvr1/dD4qfDvg4MdSIfsQXAubmMhEasFzML47tVU7p8VS5rXq1ngfSlxq7wHueehq8Hz+zDQIpVBvKk3c9np4alM4OGpRq8W0Eb3dxVkyxObw37+P1dKG89EZBSuQoDpr5F3tESPDhz/CRvvCLyZoVN8OjMs= 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 1612183372049622.7205675162754; Mon, 1 Feb 2021 04:42:52 -0800 (PST) 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-239-dvOGBOSQPI-K259WPZt1dw-1; Mon, 01 Feb 2021 07:42:46 -0500 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 2DE1B801AF6; Mon, 1 Feb 2021 12:42:40 +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 0781D72167; Mon, 1 Feb 2021 12:42:40 +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 C7D4F50047; Mon, 1 Feb 2021 12:42:39 +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 111CgJKQ014705 for ; Mon, 1 Feb 2021 07:42:19 -0500 Received: by smtp.corp.redhat.com (Postfix) id ADC755D749; Mon, 1 Feb 2021 12:42:19 +0000 (UTC) Received: from work.redhat.com (ovpn-113-167.ams2.redhat.com [10.36.113.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB9DF62461; Mon, 1 Feb 2021 12:42:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612183369; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=p53PxZNtm9H1yE/Hs2qjKSE6fjXfHCX+8XCMAI+k5gU=; b=LbmHWs0a3B20Bf0+zS3HFKxUMLQ72IYWfwZ083wpJn1FpWYXMmtd2yrhj76o3rqtpOXF9+ TpeJ44lT/SXzmYlysTwVCw/TwKMuyj7j27zm9QBlIrcgV7Ny30R6pnfVoKtqN5Mi8ssMTs Vz/4qpUbrKNtGsNqBdzJXwpTNO8XcsU= X-MC-Unique: dvOGBOSQPI-K259WPZt1dw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 06/10] udevProcessCCW: Initialize variable Date: Mon, 1 Feb 2021 13:42:03 +0100 Message-Id: <20210201124207.148709-7-twiederh@redhat.com> In-Reply-To: <20210201124207.148709-1-twiederh@redhat.com> References: <20210201124207.148709-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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" `udevGetIntSysfsAttr` does not necessarily write to the third parameter, even when it returns 0. This was found by clang-tidy's "clang-analyzer-core.UndefinedBinaryOperatorResult" check. Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/node_device/node_device_udev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index fceb135aa5..09048fb23f 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1100,7 +1100,7 @@ static int udevProcessCCW(struct udev_device *device, virNodeDeviceDefPtr def) { - int online; + int online =3D 0; =20 /* process only online devices to keep the list sane */ if (udevGetIntSysfsAttr(device, "online", &online, 0) < 0 || online != =3D 1) --=20 2.26.2