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>
This commit is contained in:
Ard Biesheuvel 2016-09-05 08:52:11 +01:00
parent 3d20524af0
commit 70c368e26f
1 changed files with 1 additions and 0 deletions

View File

@ -128,6 +128,7 @@ FdtPciPcdProducerLibConstructor (
PcdSetBool (PcdPciDisableBusEnumeration, FALSE);
IoTranslation = 0;
RetStatus = GetPciIoTranslation (FdtClient, Node, &IoTranslation);
if (!RETURN_ERROR (RetStatus)) {
PcdSet64 (PcdPciIoTranslation, IoTranslation);