From nobody Sun Feb 8 20:13:45 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=1629896128; cv=none; d=zohomail.com; s=zohoarc; b=DvWGzVZ6Yls/wwLVULfhPIurZn+ecvwAeTZV/ipAu+hD02Ancrqt/DzC+jtzWOqkXKitmZTuTR7Oh1nATMFoXXinItfX5wGm3akp/jJ+iZxpxqm+txc3l/mRP1yFiItCcSHk2UUxYqMwqrao1CXfloju+fCl3v6RNxJ3y4GmhQc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629896128; h=Content-Type:Content-Transfer-Encoding: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=0qId6VEhbvvlEXC7QJ3FXxya8zYpO5RtKTr5kO0wROY=; b=XuFO4+keD1MI4qLHUmhskZ5lJaQR0zwQm7UBIl2wLHDtTzcHU87HUkoFXe63qMShyVCh1STtWdtmcd9P9R+ocRy511GVbAHynDq7hPrZTvazWHhUr2zMQzQpXE7LKzh6heuMlP4Y3cjS8ultji6/op1u9cEyj3mofUjG1WDYQpI= 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) 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 1629896128602847.4909670235494; Wed, 25 Aug 2021 05:55:28 -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-575-u29QmW6cOzmKWKTGsXxVDg-1; Wed, 25 Aug 2021 08:55:25 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3AAEC7401; Wed, 25 Aug 2021 12:55:19 +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 B2E181036D3F; Wed, 25 Aug 2021 12:55:19 +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 7E19B4A707; Wed, 25 Aug 2021 12:55:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17PCtCCT015137 for ; Wed, 25 Aug 2021 08:55:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id B874610074F8; Wed, 25 Aug 2021 12:55:12 +0000 (UTC) Received: from bart.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4354B10016FB for ; Wed, 25 Aug 2021 12:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629896127; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=0qId6VEhbvvlEXC7QJ3FXxya8zYpO5RtKTr5kO0wROY=; b=Jk6FjiUv8j0FC+BQWmvOuyOKKMuQoqLFDntt1L2q9aDx7Ecjz3uby4rhyRW3zfxpfazhqI B+F4KNuQdaG+KRZjEuKt0lvyS/9D1bOeRovTX1wAnXigKzP3D1fuId1DWe8QzM4hJD1G+l LOfVesTxjHu/2INuZ3jmYKUX+jRRUp0= X-MC-Unique: u29QmW6cOzmKWKTGsXxVDg-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 3/4] virscsi: Drop @tmp from virSCSIDeviceListDel Date: Wed, 25 Aug 2021 14:54:58 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.84 on 10.5.11.22 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) X-ZM-MESSAGEID: 1629896129308100001 Content-Type: text/plain; charset="utf-8" Clang on Rawhide started to complain that @tmp variable in virSCSIDeviceListDel() is set but not used. This is obviously a false positive because the variable is used to free device stolen from the list. Anyway, we can do without the variable so in this specific case let's fix our code to appease Clang. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/util/virscsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virscsi.c b/src/util/virscsi.c index 2488b0e5f8..6a90d9002f 100644 --- a/src/util/virscsi.c +++ b/src/util/virscsi.c @@ -414,8 +414,7 @@ virSCSIDeviceListDel(virSCSIDeviceList *list, virSCSIDeviceUsedByInfoFree(dev->used_by[i]); VIR_DELETE_ELEMENT(dev->used_by, i, dev->n_used_by); } else { - g_autoptr(virSCSIDevice) tmp =3D NULL; - tmp =3D virSCSIDeviceListSteal(list, dev); + virSCSIDeviceFree(virSCSIDeviceListSteal(list, dev)); } break; } --=20 2.31.1