From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5A55521A143CF for ; Thu, 8 Jun 2017 15:17:19 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3B9247AE98; Thu, 8 Jun 2017 22:18:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3B9247AE98 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3B9247AE98 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-122.phx2.redhat.com [10.3.116.122]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C8A318156; Thu, 8 Jun 2017 22:18:27 +0000 (UTC) To: Ard Biesheuvel , edk2-devel@lists.01.org, jordan.l.justen@intel.com References: <20170608190516.7828-1-ard.biesheuvel@linaro.org> From: Laszlo Ersek Message-ID: Date: Fri, 9 Jun 2017 00:18:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170608190516.7828-1-ard.biesheuvel@linaro.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 08 Jun 2017 22:18:28 +0000 (UTC) Subject: Re: [PATCH] OvmfPkg/AcpiPlatformDxe: fix spurious uninitialized var warning X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 22:17:19 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 06/08/17 21:05, Ard Biesheuvel wrote: > Commit 4275f38507a4 ("OvmfPkg/AcpiPlatformDxe: alloc blobs from 64-bit > space unless restricted") introduced a variable which is [incorrectly] > identified by GCC as being potentially uninitialized. So let's just set > it to NULL before use. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c > index 98be36c64b43..a0b1cfd2be05 100644 > --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c > +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c > @@ -1001,6 +1001,7 @@ InstallQemuFwCfgTables ( > RestorePciDecoding (OriginalPciAttributes, OriginalPciAttributesCount); > LoaderEnd = LoaderStart + FwCfgSize / sizeof *LoaderEntry; > > + AllocationsRestrictedTo32Bit = NULL; > Status = CollectAllocationsRestrictedTo32Bit ( > &AllocationsRestrictedTo32Bit, > LoaderStart, > Reviewed-by: Laszlo Ersek Thanks, Ard! Laszlo