diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-09-05 08:52:11 +0100 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-09-05 12:42:46 +0100 |
commit | 70c368e26f79ba4d0867090b88d48b86884e6ab2 (patch) | |
tree | 6b8688c39cf8c041e67beafe73ca2f245740c066 /ArmVirtPkg | |
parent | 3d20524af09243e3b2e3e832d1c62975e84a5dcd (diff) | |
download | edk2-platforms-70c368e26f79ba4d0867090b88d48b86884e6ab2.tar.xz |
ArmVirtPkg/FdtPciPcdProducerLib: zero init local var to please GCC 4.8
GCC 4.8 in RELEASE mode complains about GetPciIoTranslation () potentially
not assigning IoTranslation, but does not notice that it returns failure in
this case, which means IoTranslation is never referenced *unless* it has
been assigned. So simply set IoTranslation to zero to help the compiler.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'ArmVirtPkg')
-rw-r--r-- | ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c b/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c index 10b47560cb..ea27cda7b7 100644 --- a/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c +++ b/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c @@ -128,6 +128,7 @@ FdtPciPcdProducerLibConstructor ( PcdSetBool (PcdPciDisableBusEnumeration, FALSE);
+ IoTranslation = 0;
RetStatus = GetPciIoTranslation (FdtClient, Node, &IoTranslation);
if (!RETURN_ERROR (RetStatus)) {
PcdSet64 (PcdPciIoTranslation, IoTranslation);
|