mirror of https://github.com/acidanthera/audk.git
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:
parent
3d20524af0
commit
70c368e26f
|
@ -128,6 +128,7 @@ FdtPciPcdProducerLibConstructor (
|
|||
|
||||
PcdSetBool (PcdPciDisableBusEnumeration, FALSE);
|
||||
|
||||
IoTranslation = 0;
|
||||
RetStatus = GetPciIoTranslation (FdtClient, Node, &IoTranslation);
|
||||
if (!RETURN_ERROR (RetStatus)) {
|
||||
PcdSet64 (PcdPciIoTranslation, IoTranslation);
|
||||
|
|
Loading…
Reference in New Issue