diff options
author | Leif Lindholm <leif.lindholm@linaro.org> | 2017-06-20 11:51:34 +0100 |
---|---|---|
committer | Leif Lindholm <leif.lindholm@linaro.org> | 2017-06-20 13:02:07 +0100 |
commit | 2f93c5077fc30e319342df750846b1607fe5571e (patch) | |
tree | 25f890336e0891e2759690b0fdba141278a1d1ee /ArmPlatformPkg | |
parent | 322d827c0f41efe14387ee67834ddced09f95c9c (diff) | |
download | edk2-2f93c5077fc30e319342df750846b1607fe5571e.tar.gz edk2-2f93c5077fc30e319342df750846b1607fe5571e.tar.bz2 edk2-2f93c5077fc30e319342df750846b1607fe5571e.zip |
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>
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r-- | ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 1 |
1 files changed, 1 insertions, 0 deletions
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;
|