mirror of https://github.com/acidanthera/audk.git
OvmfPkg/PlatformDxe: 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: Jordan Justen <jordan.l.justen@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=166 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> # RVCT Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
ae23afb4e7
commit
4d1362e1f9
|
@ -663,6 +663,7 @@ ExecutePlatformConfig (
|
|||
EFI_STATUS Status;
|
||||
PLATFORM_CONFIG PlatformConfig;
|
||||
UINT64 OptionalElements;
|
||||
RETURN_STATUS PcdStatus;
|
||||
|
||||
Status = PlatformConfigLoad (&PlatformConfig, &OptionalElements);
|
||||
if (EFI_ERROR (Status)) {
|
||||
|
@ -675,10 +676,13 @@ ExecutePlatformConfig (
|
|||
//
|
||||
// Pass the preferred resolution to GraphicsConsoleDxe via dynamic PCDs.
|
||||
//
|
||||
PcdSet32 (PcdVideoHorizontalResolution,
|
||||
PcdStatus = PcdSet32S (PcdVideoHorizontalResolution,
|
||||
PlatformConfig.HorizontalResolution);
|
||||
PcdSet32 (PcdVideoVerticalResolution,
|
||||
ASSERT_RETURN_ERROR (PcdStatus);
|
||||
|
||||
PcdStatus = PcdSet32S (PcdVideoVerticalResolution,
|
||||
PlatformConfig.VerticalResolution);
|
||||
ASSERT_RETURN_ERROR (PcdStatus);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue