Revision: 17535
          http://sourceforge.net/p/edk2/code/17535
Author:   lzeng14
Date:     2015-05-29 04:04:01 +0000 (Fri, 29 May 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Feng Tian <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c

Modified: trunk/edk2/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c
===================================================================
--- trunk/edk2/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c  2015-05-28 
18:29:15 UTC (rev 17534)
+++ trunk/edk2/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c  2015-05-29 
04:04:01 UTC (rev 17535)
@@ -778,10 +778,10 @@
 
   @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 @@
   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 @@
   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) {


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to