From: Olivier Martin Date: Fri, 12 Dec 2014 02:01:54 +0000 (+0000) Subject: MdeModulePkg/DxeCore: Fixed compiler error 'enumerated type mixed with another type' X-Git-Tag: edk2-stable201903~10543 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=99730361ec4724c07f6898a59615a8d33166e62f MdeModulePkg/DxeCore: Fixed compiler error 'enumerated type mixed with another type' ARM Toolchain raises a warning/error when an integer is used instead of a enum value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin Reviewed-by: Feng Tian git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16501 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c index 64967259a2..f4ec48ff67 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Page.c +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c @@ -1402,13 +1402,13 @@ CoreFreePages ( ) { EFI_STATUS Status; - - Status = CoreInternalFreePages (Memory, NumberOfPages); - if (!EFI_ERROR (Status)) { - CoreUpdateProfile ((EFI_PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS (0), MemoryProfileActionFreePages, 0, EFI_PAGES_TO_SIZE (NumberOfPages), (VOID *) (UINTN) Memory); - } - return Status; -} + + Status = CoreInternalFreePages (Memory, NumberOfPages); + if (!EFI_ERROR (Status)) { + CoreUpdateProfile ((EFI_PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS (0), MemoryProfileActionFreePages, (EFI_MEMORY_TYPE) 0, EFI_PAGES_TO_SIZE (NumberOfPages), (VOID *) (UINTN) Memory); + } + return Status; +} /** This function checks to see if the last memory map descriptor in a memory map diff --git a/MdeModulePkg/Core/Dxe/Mem/Pool.c b/MdeModulePkg/Core/Dxe/Mem/Pool.c index 1891bb7387..6bf289b38f 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Pool.c +++ b/MdeModulePkg/Core/Dxe/Mem/Pool.c @@ -433,13 +433,13 @@ CoreFreePool ( ) { EFI_STATUS Status; - - Status = CoreInternalFreePool (Buffer); - if (!EFI_ERROR (Status)) { - CoreUpdateProfile ((EFI_PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS (0), MemoryProfileActionFreePool, 0, 0, Buffer); - } - return Status; -} + + Status = CoreInternalFreePool (Buffer); + if (!EFI_ERROR (Status)) { + CoreUpdateProfile ((EFI_PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS (0), MemoryProfileActionFreePool, (EFI_MEMORY_TYPE) 0, 0, Buffer); + } + return Status; +} /** Internal function to free a pool entry.