mirror of https://github.com/acidanthera/audk.git
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:
parent
322d827c0f
commit
2f93c5077f
|
@ -343,6 +343,7 @@ ArmJunoSetNicMacAddress ()
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PciRegBase = 0;
|
||||||
Status = InitPciDev (PciIo, &PciRegBase, &OldPciAttr);
|
Status = InitPciDev (PciIo, &PciRegBase, &OldPciAttr);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
|
|
Loading…
Reference in New Issue