From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x22e.google.com (mail-wr0-x22e.google.com [IPv6:2a00:1450:400c:c0c::22e]) (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 E3DAF21A143C2 for ; Thu, 8 Jun 2017 12:04:15 -0700 (PDT) Received: by mail-wr0-x22e.google.com with SMTP id v111so22191917wrc.3 for ; Thu, 08 Jun 2017 12:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=z+abcTal5HdQOISf5V/dGqaDAbH+rE2gCm0fh5e5ZAg=; b=hwgkQRqcwhcYvmr73277GTPfgu9ewD96p0gn0TI79M0ZQLJ1mdSxWkefDUwiwUMfDa 8XeXxNN/gfogo845Rc46gx5r72ekVAw7hapOQPwguPjS8l9JwuLEM49vAWlJD8bD6gir iq3QRIHtMK3vyTBcT5GCfZi5/2Mr4dmuxafQw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=z+abcTal5HdQOISf5V/dGqaDAbH+rE2gCm0fh5e5ZAg=; b=hJfwIK1aAgX4MesiSbgpufeLktKYGEzMxoK6PLavhocSIS9XTbPlES/zfYVG4CaeC7 gkAl3M3gIdgjKHsCP1DI+jK3PxytIF6g2dHpkrQDkXhPvtRftY2BYtFykYiiYsHcFeE0 HUL4ysuSo3qjixSk39wcJVQUJ2DldJ1IRHjQ9Tpj9Zcw2QHkBoOkW9TeFqLxsMWGdqUS khYOirKwYz1ZFOsgLqvKMsWkFSpGAWkIku51WafXYtJYJb65sA8aw2h2mKCfE33vt2LI JhYpicpJwz+NNrHNsapqdc9YTvn5ZSLYQD6Pzho5k8HLwS4oQEjfqeRFzeRjDqQqEI5r Juvg== X-Gm-Message-State: AODbwcAkZWObL57UtFEHzXoqv/hME7Z5iEEFmIj7QhnOSZfVLFuaC5FW xFTLuvZNhu6MlRrlg7Kbwg== X-Received: by 10.223.151.219 with SMTP id t27mr24746427wrb.90.1496948723656; Thu, 08 Jun 2017 12:05:23 -0700 (PDT) Received: from localhost.localdomain ([160.162.216.209]) by smtp.gmail.com with ESMTPSA id 2sm7462882wrx.26.2017.06.08.12.05.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jun 2017 12:05:22 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com, jordan.l.justen@intel.com Cc: Ard Biesheuvel Date: Thu, 8 Jun 2017 19:05:16 +0000 Message-Id: <20170608190516.7828-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 Subject: [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 19:04:16 -0000 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, -- 2.9.3