]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/PciRootBridgeNoEnumerationDxe/DeviceIo.c
Fix comparisons of enumerated types which may cause warnings for some compilers.
[mirror_edk2.git] / DuetPkg / PciRootBridgeNoEnumerationDxe / DeviceIo.c
index 20098d94eb02f1725cc339dfe4932aab0090399e..b9cae2b2ce6ce3fed9e68043b3e5c83e47286221 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006 - 2008, 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
@@ -363,7 +363,7 @@ Returns:
 \r
   Private = DEVICE_IO_PRIVATE_DATA_FROM_THIS (This);\r
 \r
-  if (Width < 0 || Width >= MMIO_COPY_UINT8) {\r
+  if ((UINT32)Width >= MMIO_COPY_UINT8) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -415,7 +415,7 @@ Returns:
 \r
   Private = DEVICE_IO_PRIVATE_DATA_FROM_THIS (This);\r
 \r
-  if (Width < 0 || Width >= MMIO_COPY_UINT8) {\r
+  if ((UINT32)Width >= MMIO_COPY_UINT8) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -648,7 +648,7 @@ Returns:
 \r
   Private = DEVICE_IO_PRIVATE_DATA_FROM_THIS (This);\r
 \r
-  if (Operation < 0 || Operation > EfiBusMasterCommonBuffer) {\r
+  if ((UINT32)Operation > EfiBusMasterCommonBuffer) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -748,7 +748,7 @@ Returns:
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  if ((Type >= MaxAllocateType) || (Type < AllocateAnyPages)) {\r
+  if ((UINT32)Type >= MaxAllocateType) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r