From nobody Thu May 2 18:05:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1636102603; cv=none; d=zohomail.com; s=zohoarc; b=hPRGAzQt4DfRGLVfTYzmGESvxlb9ZLck39LJJvnnT8F+JGTlLyGBKSp0it7qWGTR2rkVIaPjjlrFnS78DboqGcUQ/Mnpj4Twwj+RoDNss+Lx04JghSCmQ/jRPqqZezMqGoLqR3vnLVLm+X8E3ffHogsc5ir0t64XlhD8nEjERaw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636102603; 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=gycSVmNt+eLdfK65MH3K71rZqqYOQ2tisd0C5l+am/k=; b=INaUxfvSEh2z6CT/n7IgfpHkyqp0KShGw6WkppkacY3EtSEhFycITEL5DUyfozqaCgXyR20SOE8OMCGcPBbJLKFSXm1XfB7rEVqVJ2HPvtEVom+PHYucizUsnFBPKOQ1ktUUXzAtkJmLiNX5rvlCcMOVTPqhnUY/0AVn0+0pRv0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 1636102603188833.604622552475; Fri, 5 Nov 2021 01:56:43 -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-324-fLPoXrUzNQWhMWTZq5Nvog-1; Fri, 05 Nov 2021 04:56:38 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B55A810A8E00; Fri, 5 Nov 2021 08:56:33 +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 6180C60BF1; Fri, 5 Nov 2021 08:56:33 +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 258464A703; Fri, 5 Nov 2021 08:56:32 +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 1A58uUdQ023385 for ; Fri, 5 Nov 2021 04:56:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 528541B5AA; Fri, 5 Nov 2021 08:56:30 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB8FC13ABD for ; Fri, 5 Nov 2021 08:56:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636102602; 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=gycSVmNt+eLdfK65MH3K71rZqqYOQ2tisd0C5l+am/k=; b=bEEuN1mhcuJ/gpBhhjZSA6mHhm/+0+xS3Wh7kugfFxzWsl0kyZ/6XhHsFgJXRHB5yB4U0D KVCYO24BTKkH6nT9y1jAALqRsP5jM+HJxswHDmWcni0Z4lOjMrHN7omOjz/wV62C8OzBtW Eqly6MDDUEgvJFXWzKdbVpe4BQCCmgc= X-MC-Unique: fLPoXrUzNQWhMWTZq5Nvog-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] qemuTPMEmulatorReconfigure: Fix two build issues Date: Fri, 5 Nov 2021 09:56:28 +0100 Message-Id: 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.12 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1636102604279100001 1) 'activePcrBanksStr' is not initialized: ../../../libvirt/src/qemu/qemu_tpm.c: In function =E2=80=98qemuExtTPMStart= =E2=80=99: /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: =E2=80=98active= PcrBanksStr=E2=80=99 may be used uninitialized in this function [-Werror=3D= maybe-uninitialized] 28 | g_free (*pp); | ^~~~~~~~~~~~ ../../../libvirt/src/qemu/qemu_tpm.c:613:22: note: =E2=80=98activePcrBanksS= tr=E2=80=99 was declared here 613 | g_autofree char *activePcrBanksStr; | ^~~~~~~~~~~~~~~~~ 2) 'pwdfile_fd' is unused: ../../../libvirt/src/qemu/qemu_tpm.c:615:19: error: unused variable 'pwdfil= e_fd' [-Werror,-Wunused-variable] VIR_AUTOCLOSE pwdfile_fd =3D -1; Fixes: a5bbe1a8b63 Signed-off-by: Peter Krempa --- Pushed. src/qemu/qemu_tpm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 25890a8589..7d05394356 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -610,9 +610,8 @@ qemuTPMEmulatorReconfigure(const char *storagepath, { g_autoptr(virCommand) cmd =3D NULL; int exitstatus; - g_autofree char *activePcrBanksStr; + g_autofree char *activePcrBanksStr =3D NULL; g_autofree char *swtpm_setup =3D virTPMGetSwtpmSetup(); - VIR_AUTOCLOSE pwdfile_fd =3D -1; if (!swtpm_setup) return -1; --=20 2.31.1