From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8A41221967BC4 for ; Fri, 9 Jun 2017 01:57:16 -0700 (PDT) Received: by mail-it0-x236.google.com with SMTP id m62so134430716itc.0 for ; Fri, 09 Jun 2017 01:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5snmaAwNuwu9avl0UdSXZJ3yMGS+wYWfwFdf5i/ueEg=; b=CorPmJnevNa082svcghdR+nxlYki2S3PG7aKBya6ljWFK7/daKpEMNW6Ih5EKeJeqT pmZM84c7kJUCHwYRGf/MU73/h7U8bXO9cE8nsYS9LRxvR0rKcn9JF6/ohCTBMnAoFQDE j6ymqIzwxcAEB+5WPufpRNdMbK+1M4VSZVqdE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5snmaAwNuwu9avl0UdSXZJ3yMGS+wYWfwFdf5i/ueEg=; b=co1dNzYPwqtbJur6Z9tH7+Fu9u3JApWahgYUHBSSzeGYo1FbyVk3v2dgaddvPydGnF Z1lAA69A6Ob3+iRluX6sWAKZ/9zSkmB+6WAx2G/R7GYhaW0iilRNvZb9qWVi0Te21Ar3 h4ph6VgV1FIo6RKe5zfbfOd6h9T7VlRxLmQQjVPsL+e8oiKfwDsr0YxCm8wmkz1KiFRk PyZ1eAMWfNrpJ+Ba0H+8xQyOX21g4wMatq5p04hA0BokAOu33l4KAOVG1MNlFxhRsOm+ 4aK11ORyEkN0lsQEwyVZEJ0qc7cpR0gFb3p6qSM42SlqQ9ZcbWrlxfkEXrRbazOiXeLY uYHA== X-Gm-Message-State: AODbwcC4km5F5wbc//r5uyN7etHWGqMicwYJWSTF4StoQojFNhJWALbv qMEOrlznpq+gc5diCdkHHQg1GC9Y6f8n X-Received: by 10.36.9.144 with SMTP id 138mr9714863itm.98.1496998705940; Fri, 09 Jun 2017 01:58:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.164.76 with HTTP; Fri, 9 Jun 2017 01:58:25 -0700 (PDT) In-Reply-To: References: <20170608190516.7828-1-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Fri, 9 Jun 2017 08:58:25 +0000 Message-ID: To: Laszlo Ersek Cc: "edk2-devel@lists.01.org" , Jordan Justen 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: Fri, 09 Jun 2017 08:57:16 -0000 Content-Type: text/plain; charset="UTF-8" On 8 June 2017 at 22:18, Laszlo Ersek wrote: > 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 > Pushed as 8f98c76f992b