From nobody Mon Apr 29 01:50:43 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1497956535555810.5158808345731; Tue, 20 Jun 2017 04:02:15 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C735C21C8F61C; Tue, 20 Jun 2017 04:00:49 -0700 (PDT) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (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 811C521BB2527 for ; Tue, 20 Jun 2017 04:00:48 -0700 (PDT) Received: by mail-wm0-x231.google.com with SMTP id m125so18290206wmm.1 for ; Tue, 20 Jun 2017 04:02:11 -0700 (PDT) Received: from mohikan.hemma.eciton.net (cpc92316-cmbg19-2-0-cust118.5-4.cable.virginm.net. [82.12.0.119]) by smtp.gmail.com with ESMTPSA id w128sm6398198wmd.7.2017.06.20.04.02.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 04:02:09 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZZudXzyNBow8fuwhyOa9yeA98jLXHc8IFnIR6pyxAWU=; b=LyjOS2DtAarbutkfshHvPXjpveU9RMkbcf5oBRg5CdcGHEMAZQQWhnukz2XXItC+Nn m9tj7sOtmKXRAS5vNo8PVifAnDQfp41rWceX6Kkiq1fujqNNsFMph1duLHXQLhEg54Cm xbuM2ug5czwt+YFC9R4+aRTUPcB4M2FLnB05w= 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:mime-version :content-transfer-encoding; bh=ZZudXzyNBow8fuwhyOa9yeA98jLXHc8IFnIR6pyxAWU=; b=dVmIdPYGsBy4z/Ox2kcxiYVzcftOnHSA6dZWcLfg5MqMKcvzAZ/+EZyKNodOx6XltO nd/wRVQJUaWyaelvAbTE1lwebrUKidc3a0aPvcOlNTt6acYlbXWiQYNzdd7Uoszam5Vc B2Jm610V23cXU/S3SoFfylmpmZr7x8OAmj2iSLqJBn2NeZNM5MetRlRBrBq+QtYgeald fDbI4hJDTmIJPNJMVTsLZQLzcCZzWyUFJFYvtq2mwH2/E6MvuODl1CgZddLerO3XCWwr b6BgRkRMo/ztqPOskN8FmU+8qt6Rw8WXHU7hGFdJbO9iEkVZEv7CAuhxk7Q7kEzeRB/X 1KoQ== X-Gm-Message-State: AKS2vOw2KHQ/wKQRMMxDkx1+bsRzqmxSh5V4f8DhyTX0zubCu/RiXouG jsG4jeFnWAmf/wQ2wPg5Og== X-Received: by 10.28.103.193 with SMTP id b184mr2482038wmc.25.1497956529535; Tue, 20 Jun 2017 04:02:09 -0700 (PDT) From: Leif Lindholm To: edk2-devel@lists.01.org Date: Tue, 20 Jun 2017 12:00:08 +0100 Message-Id: <20170620110008.24413-1-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [edk2] [PATCH] ArmPlatformPkg: eliminate Juno gcc build 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: ryan.harkin@linaro.org, ard.biesheuvel@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 When building without LTO, gcc incorrectly resolves the hazards for 'PciRegBase=E2=80=99 when inlining, leading to "may be used uninitialized" warnings (and hence build failure with -Werror). Eliminate this warning by explicitly initializing the variable to 0. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel Reviewed-by: Ryan Harkin --- For those who have heard me mentioning this before but arguing against upstreaming this patch: I only just tweaked that this warning doesn't go away with more recent toolchains, but simply when switching to GCC5 build profile, and hence LTO. Build failure still reproducible with gcc 6.3.1 and GCC49. ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/Ar= mPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c index da93eb5829..18491c7378 100644 --- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c +++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c @@ -343,6 +343,7 @@ ArmJunoSetNicMacAddress () return Status; } =20 + PciRegBase =3D 0; Status =3D InitPciDev (PciIo, &PciRegBase, &OldPciAttr); if (EFI_ERROR (Status)) { return Status; --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel