diff options
author | Star Zeng <star.zeng@intel.com> | 2015-05-29 04:04:01 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@Edk2> | 2015-05-29 04:04:01 +0000 |
commit | 97e64288c8e923663cec3eef0f56dead85860954 (patch) | |
tree | 238bf8b1170cf64c237f0aa46f7f1c042eff759d /MdeModulePkg/Core | |
parent | b9a9f56c5fb1bd1b0f7cb1fb88b3165a1777b97c (diff) | |
download | edk2-platforms-97e64288c8e923663cec3eef0f56dead85860954.tar.xz |
MdeModulePkg/DxeCore: Fixed build error.
ARM toolchain raises the build error: "enumerated type mixed with
another type".
To fix the issue, typecase can be used like below.
- return EfiMaxMemoryType + 1;
+ return (EFI_MEMORY_TYPE)(EfiMaxMemoryType + 1);
But to eliminate the confusion, update the return type of
GetProfileMemoryIndex() from EFI_MEMORY_TYPE to UINTN.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17535 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c b/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c index 2c6713f5e9..1f17947808 100644 --- a/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c +++ b/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c @@ -778,10 +778,10 @@ CoreNeedRecordProfile ( @param MemoryType Memory type.
- @return EFI memory type as profile memory index.
+ @return Profile memory index.
**/
-EFI_MEMORY_TYPE
+UINTN
GetProfileMemoryIndex (
IN EFI_MEMORY_TYPE MemoryType
)
@@ -824,7 +824,7 @@ CoreUpdateProfileAllocate ( MEMORY_PROFILE_CONTEXT_DATA *ContextData;
MEMORY_PROFILE_DRIVER_INFO_DATA *DriverInfoData;
MEMORY_PROFILE_ALLOC_INFO_DATA *AllocInfoData;
- EFI_MEMORY_TYPE ProfileMemoryIndex;
+ UINTN ProfileMemoryIndex;
AllocInfoData = NULL;
@@ -977,7 +977,7 @@ CoreUpdateProfileFree ( LIST_ENTRY *DriverInfoList;
MEMORY_PROFILE_DRIVER_INFO_DATA *ThisDriverInfoData;
MEMORY_PROFILE_ALLOC_INFO_DATA *AllocInfoData;
- EFI_MEMORY_TYPE ProfileMemoryIndex;
+ UINTN ProfileMemoryIndex;
ContextData = GetMemoryProfileContext ();
if (ContextData == NULL) {
|