From patchwork Thu Jun 8 19:05:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 103401 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp2585502qgd; Thu, 8 Jun 2017 12:05:26 -0700 (PDT) X-Received: by 10.99.107.136 with SMTP id g130mr38082825pgc.3.1496948726841; Thu, 08 Jun 2017 12:05:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496948726; cv=none; d=google.com; s=arc-20160816; b=coyPyL4ObVVNw6G2g1RbI9TLeXz/8yMOrdG6Ltmxm30xQlw77srfhgb7XCjCJVX5V2 ++MwG0Y18SfEpQHiPKFGeYV3vpiWpHla2dJnPR/Cn+9LISBB2uyGOi3+Q1riqE1FyYc5 0c0NOvZu1Pl2zlL/XdHy0Mj+WhF8/gesNGzaXVua4KzD2qoZ32hdV6yh4+o5q3O0tQVD iZxf52xyIX34AkFIaBCqRkBWrNHz8TKxQRSqDvyXLXquUZVTJTogFSkz3N6tZM7DY20e 6UJ1MBHL7y1kEyEnuTmrlzVFB1vH10d1dkJY/9W3yQjtFE5ZNPEa9VV4N7dqivu0C4Vk 03tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=3/UFWP/bQ79MhemCSBWiXG1A12fu8ku5AeufrMg9cKs=; b=p5D0AAwKJK4AkwpWTnR9Ou/FF6q70tUP6lJ7t08UsLuNXdzAFlCKyybJ5qCkDWDg0D Y5UPzWZDM/t2PBU8iq+0NbtJ/hKiaR5EPlkgK3BoRgSkdl01qIegCgdZ1EYZA+gU/Tpr fF89671M/KYJouOkm/knNel76vlDz99YZejjtD8DnQY5M8vGKBD+g6fdA7AOpwcle3Ki +1a5wLdeoZoI5kWGIYSOaWzRWFgi8ApMJyDokuTVU2pW05xpSGWm2CuHDn1x7Id4afw+ fwTh0dnfAHpuoXGxTs1TmiaSNGq/2w6slR9qfK5fk/wCPd0GCQzT5oIbnFnJGe9YSEnp 1Guw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id 3si5043267pfj.110.2017.06.08.12.05.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jun 2017 12:05:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8E21621A143C4; Thu, 8 Jun 2017 12:04:16 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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 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: [edk2] [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: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(+) -- 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek 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,