From 2f93c5077fc30e319342df750846b1607fe5571e Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Tue, 20 Jun 2017 11:51:34 +0100 Subject: [PATCH] ArmPlatformPkg: eliminate Juno gcc build warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When building without LTO, gcc incorrectly resolves the hazards for 'PciRegBase’ 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 --- ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/ArmPlatformPkg/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; } + PciRegBase = 0; Status = InitPciDev (PciIo, &PciRegBase, &OldPciAttr); if (EFI_ERROR (Status)) { return Status; -- 2.39.2