]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Core/Dxe/Mem/Page.c
Partially make EdkModulePkg pass intel IPF compiler with /W4 /WX switched on.
[mirror_edk2.git] / EdkModulePkg / Core / Dxe / Mem / Page.c
index d14468945f2615762f90becbeb27e777807a7cfa..44116abcb6159df34e858ec6a461c52c79f80d4e 100644 (file)
@@ -308,7 +308,7 @@ Returns:
     //\r
     // Make sure the memory type in the gMemoryTypeInformation[] array is valid\r
     //\r
-    Type = gMemoryTypeInformation[Index].Type;\r
+    Type = (EFI_MEMORY_TYPE) (gMemoryTypeInformation[Index].Type);\r
     if (Type < 0 || Type > EfiMaxMemoryType) {\r
       continue;\r
     }\r
@@ -333,7 +333,7 @@ Returns:
           //\r
           // Make sure the memory type in the gMemoryTypeInformation[] array is valid\r
           //\r
-          Type = gMemoryTypeInformation[FreeIndex].Type;\r
+          Type = (EFI_MEMORY_TYPE) (gMemoryTypeInformation[FreeIndex].Type);\r
           if (Type < 0 || Type > EfiMaxMemoryType) {\r
             continue;\r
           }\r
@@ -376,7 +376,7 @@ Returns:
     //\r
     // Make sure the memory type in the gMemoryTypeInformation[] array is valid\r
     //\r
-    Type = gMemoryTypeInformation[Index].Type;\r
+    Type = (EFI_MEMORY_TYPE) (gMemoryTypeInformation[Index].Type);\r
     if (Type < 0 || Type > EfiMaxMemoryType) {\r
       continue;\r
     }\r
@@ -394,7 +394,7 @@ Returns:
   // If the number of pages reserved for a memory type is 0, then all allocations for that type\r
   // should be in the default range.\r
   //\r
-  for (Type = 0; Type < EfiMaxMemoryType; Type++) {\r
+  for (Type = (EFI_MEMORY_TYPE) 0; Type < EfiMaxMemoryType; Type++) {\r
     for (Index = 0; gMemoryTypeInformation[Index].Type != EfiMaxMemoryType; Index++) {\r
       if (Type == (EFI_MEMORY_TYPE)gMemoryTypeInformation[Index].Type) {\r
         mMemoryTypeStatistics[Type].InformationIndex = Index;\r
@@ -1457,7 +1457,6 @@ Returns:
 \r
 --*/\r
 {\r
-  EFI_STATUS        Status;\r
   UINT64            Start;\r
 \r
   //\r
@@ -1471,7 +1470,7 @@ Returns:
   if (Start == 0) {\r
     DEBUG ((EFI_D_ERROR | EFI_D_PAGE, "AllocatePoolPages: failed to allocate %d pages\n", NumberOfPages));\r
   } else {\r
-    Status = CoreConvertPages (Start, NumberOfPages, PoolType);\r
+    CoreConvertPages (Start, NumberOfPages, PoolType);\r
   }\r
 \r
   return (VOID *)(UINTN)Start;\r