]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Mem/Pool.c
Fix comparisons of enumerated types which may cause warnings for some compilers.
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Mem / Pool.c
index cdf3f8f095cc925cc8ce7f397d9eceb761791680..e0f0869e53df5ea1b552fce780290c11ff3894e2 100644 (file)
@@ -120,7 +120,7 @@ LookupPoolHead (
   POOL            *Pool;\r
   UINTN           Index;\r
 \r
-  if (MemoryType >= 0 && MemoryType < EfiMaxMemoryType) {\r
+  if ((UINT32)MemoryType < EfiMaxMemoryType) {\r
     return &mPoolHead[MemoryType];\r
   }\r
 \r
@@ -550,7 +550,7 @@ CoreFreePoolI (
   // portion of that memory type has been freed.  If it has, then free the\r
   // list entry for that memory type\r
   //\r
-  if (Pool->MemoryType < 0 && Pool->Used == 0) {\r
+  if ((INT32)Pool->MemoryType < 0 && Pool->Used == 0) {\r
     RemoveEntryList (&Pool->Link);\r
     CoreFreePoolI (Pool);\r
   }\r