ArmPlatformPkg: eliminate Juno gcc build warning

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 <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
This commit is contained in:
Leif Lindholm 2017-06-20 11:51:34 +01:00
parent 322d827c0f
commit 2f93c5077f
1 changed files with 1 additions and 0 deletions

View File

@ -343,6 +343,7 @@ ArmJunoSetNicMacAddress ()
return Status;
}
PciRegBase = 0;
Status = InitPciDev (PciIo, &PciRegBase, &OldPciAttr);
if (EFI_ERROR (Status)) {
return Status;