From 2f3197b485e3b887580e568c1f3da4c011fcf60d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20H=C3=A4user?= Date: Tue, 27 Feb 2018 18:23:05 +0100 Subject: MinPlatformPkg/TestPointCheckLib: Add missing typecasts to UINTN. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser Reviewed-by: Jiewen Yao --- .../Library/TestPointCheckLib/DxeTestPointCheckLib.c | 16 ++++++++-------- .../Library/TestPointCheckLib/SmmTestPointCheckLib.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeTestPointCheckLib.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeTestPointCheckLib.c index 7a890bcd99..5880911a6d 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeTestPointCheckLib.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeTestPointCheckLib.c @@ -517,24 +517,24 @@ TestPointDxeSmmReadyToBootSmmPageProtection ( CommData->UefiMemoryAttributeTableSize = MemoryAttributesTableSize; CopyMem ( - (VOID *)((UINTN)CommData + CommData->UefiMemoryMapOffset), + (VOID *)(UINTN)((UINTN)CommData + CommData->UefiMemoryMapOffset), UefiMemoryMap, - CommData->UefiMemoryMapSize + (UINTN)CommData->UefiMemoryMapSize ); CopyMem ( - (VOID *)((UINTN)CommData + CommData->GcdMemoryMapOffset), + (VOID *)(UINTN)((UINTN)CommData + CommData->GcdMemoryMapOffset), GcdMemoryMap, - CommData->GcdMemoryMapSize + (UINTN)CommData->GcdMemoryMapSize ); CopyMem ( - (VOID *)((UINTN)CommData + CommData->GcdIoMapOffset), + (VOID *)(UINTN)((UINTN)CommData + CommData->GcdIoMapOffset), GcdIoMap, - CommData->GcdIoMapSize + (UINTN)CommData->GcdIoMapSize ); CopyMem ( - (VOID *)((UINTN)CommData + CommData->UefiMemoryAttributeTableOffset), + (VOID *)(UINTN)((UINTN)CommData + CommData->UefiMemoryAttributeTableOffset), MemoryAttributesTable, - CommData->UefiMemoryAttributeTableSize + (UINTN)CommData->UefiMemoryAttributeTableSize ); CommSize = OFFSET_OF(EFI_SMM_COMMUNICATE_HEADER, Data) + CommHeader->MessageLength; diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestPointCheckLib.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestPointCheckLib.c index 25b86e8b24..ff536ae801 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestPointCheckLib.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestPointCheckLib.c @@ -332,10 +332,10 @@ TestPointSmmReadyToBootSmmPageProtectionHandler ( Result = TRUE; Status = TestPointCheckSmmCommunicationBuffer ( - (EFI_MEMORY_DESCRIPTOR *)((UINTN)CommData + CommData->UefiMemoryMapOffset), + (EFI_MEMORY_DESCRIPTOR *)(UINTN)((UINTN)CommData + CommData->UefiMemoryMapOffset), (UINTN)CommData->UefiMemoryMapSize, mUefiDescriptorSize, - (CommData->UefiMemoryAttributeTableSize != 0) ? (EFI_MEMORY_ATTRIBUTES_TABLE *)((UINTN)CommData + CommData->UefiMemoryAttributeTableOffset) : NULL + (CommData->UefiMemoryAttributeTableSize != 0) ? (EFI_MEMORY_ATTRIBUTES_TABLE *)(UINTN)((UINTN)CommData + CommData->UefiMemoryAttributeTableOffset) : NULL ); if (EFI_ERROR(Status)) { Result = FALSE; -- cgit v1.2.3