From 2ea0fee9c77556d2cd8f898500c2240dd41e8a40 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Fri, 21 Oct 2016 11:59:36 +0200 Subject: [PATCH] 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 Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=165 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel Tested-by: Ard Biesheuvel # RVCT Reviewed-by: Jordan Justen --- ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c index aecad570a0..56f4c921b5 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -578,6 +578,8 @@ PlatformBootManagerBeforeConsole ( VOID ) { + RETURN_STATUS PcdStatus; + // // Signal EndOfDxe PI Event // @@ -629,7 +631,9 @@ PlatformBootManagerBeforeConsole ( // // 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. -- 2.39.2