From 43e332071d019ce155431a153cf5cd72ab48afac Mon Sep 17 00:00:00 2001 From: xli24 Date: Thu, 17 Dec 2009 02:42:22 +0000 Subject: [PATCH] Refine type cast. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9574 6f19259b-4bc3-4df7-8a09-765794883524 --- .../RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c index a8c43a0d62..0a182e7d89 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c @@ -146,7 +146,7 @@ Register ( // buffer and event trigger. // if (Tpl != TPL_HIGH_LEVEL) { - CallbackEntry->StatusCodeDataBuffer = (EFI_PHYSICAL_ADDRESS) AllocatePool (EFI_PAGE_SIZE); + CallbackEntry->StatusCodeDataBuffer = (EFI_PHYSICAL_ADDRESS) (UINTN) AllocatePool (EFI_PAGE_SIZE); CallbackEntry->BufferSize = EFI_PAGE_SIZE; CallbackEntry->EndPointer = CallbackEntry->StatusCodeDataBuffer; Status = gBS->CreateEvent ( @@ -288,8 +288,8 @@ ReportDispatcher ( (VOID *) (UINTN) CallbackEntry->StatusCodeDataBuffer ); if (NewBuffer != NULL) { - CallbackEntry->EndPointer = (EFI_PHYSICAL_ADDRESS) NewBuffer + (CallbackEntry->EndPointer - CallbackEntry->StatusCodeDataBuffer); - CallbackEntry->StatusCodeDataBuffer = (EFI_PHYSICAL_ADDRESS) NewBuffer; + CallbackEntry->EndPointer = (EFI_PHYSICAL_ADDRESS) (UINTN) NewBuffer + (CallbackEntry->EndPointer - CallbackEntry->StatusCodeDataBuffer); + CallbackEntry->StatusCodeDataBuffer = (EFI_PHYSICAL_ADDRESS) (UINTN) NewBuffer; CallbackEntry->BufferSize *= 2; } }