]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c
Fix comparisons of enumerated types which may cause warnings for some compilers.
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Isa / IsaBusDxe / IsaIo.c
index e4715383eacf4442b6df6a7c01fd1af7ba89fd05..6f1cd1b8b11947124b455289f0c3c855a23e2b73 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation for EFI_ISA_IO_PROTOCOL. \r
   \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -439,8 +439,7 @@ IsaIoVerifyAccess (
   EFI_ISA_ACPI_RESOURCE *Item;\r
   EFI_STATUS            Status;\r
 \r
-  if (Width < EfiIsaIoWidthUint8 ||\r
-      Width >= EfiIsaIoWidthMaximum ||\r
+  if ((UINT32)Width >= EfiIsaIoWidthMaximum ||\r
       Width == EfiIsaIoWidthReserved ||\r
       Width == EfiIsaIoWidthFifoReserved ||\r
       Width == EfiIsaIoWidthFillReserved\r
@@ -1000,7 +999,7 @@ IsaIoMapFullSupport (
   //\r
   // Make sure the Operation parameter is valid\r
   //\r
-  if (Operation < 0 || Operation >= EfiIsaIoOperationMaximum) {\r
+  if ((UINT32)Operation >= EfiIsaIoOperationMaximum) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -1378,7 +1377,7 @@ IsaIoAllocateBuffer (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  if (Type < AllocateAnyPages || Type >= MaxAllocateType) {\r
+  if ((UINT32)Type >= MaxAllocateType) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   //\r