ArmVirtPkg/PlatformBootManagerLib: eliminate unchecked PcdSetXX() calls

These are deprecated / disabled under the
DISABLE_NEW_DEPRECATED_INTERFACES feature test macro.

Introduce a variable called PcdStatus, and use it to assert the success of
these operations (there is no reason for them to fail here).

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=165
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> # RVCT
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Laszlo Ersek 2016-10-21 11:59:36 +02:00
parent 5d1546b439
commit 2ea0fee9c7
1 changed files with 5 additions and 1 deletions

View File

@ -578,6 +578,8 @@ PlatformBootManagerBeforeConsole (
VOID VOID
) )
{ {
RETURN_STATUS PcdStatus;
// //
// Signal EndOfDxe PI Event // Signal EndOfDxe PI Event
// //
@ -629,7 +631,9 @@ PlatformBootManagerBeforeConsole (
// //
// Set the front page timeout from the QEMU configuration. // Set the front page timeout from the QEMU configuration.
// //
PcdSet16 (PcdPlatformBootTimeOut, GetFrontPageTimeoutFromQemu ()); PcdStatus = PcdSet16S (PcdPlatformBootTimeOut,
GetFrontPageTimeoutFromQemu ());
ASSERT_RETURN_ERROR (PcdStatus);
// //
// Register platform-specific boot options and keyboard shortcuts. // Register platform-specific boot options and keyboard shortcuts.