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:
@@ -128,6 +128,7 @@ FdtPciPcdProducerLibConstructor (
|
|||||||
|
|
||||||
PcdSetBool (PcdPciDisableBusEnumeration, FALSE);
|
PcdSetBool (PcdPciDisableBusEnumeration, FALSE);
|
||||||
|
|
||||||
|
IoTranslation = 0;
|
||||||
RetStatus = GetPciIoTranslation (FdtClient, Node, &IoTranslation);
|
RetStatus = GetPciIoTranslation (FdtClient, Node, &IoTranslation);
|
||||||
if (!RETURN_ERROR (RetStatus)) {
|
if (!RETURN_ERROR (RetStatus)) {
|
||||||
PcdSet64 (PcdPciIoTranslation, IoTranslation);
|
PcdSet64 (PcdPciIoTranslation, IoTranslation);
|
||||||
|
Reference in New Issue
Block a user