]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/DeviceIoOnPciRootBridgeIoThunk/DeviceIoOnPciRootBridgeIoThunk.c
Fix comparisons of enumerated types which may cause warnings for some compilers.
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / DeviceIoOnPciRootBridgeIoThunk / DeviceIoOnPciRootBridgeIoThunk.c
index 5171a66b0a8fffde4f1246c9212f7e944e69a45a..da55e12178938b8a8addb4be5fc7be98ede4778d 100644 (file)
@@ -12,7 +12,7 @@ This module module layers Device I/O on top of PCI Root Bridge I/O (Segment 0)
    Platform required to support EFI drivers that consume Device I/O\r
    Platform required to support EFI applications that consume Device I/O\r
 \r
-Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2008 - 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
@@ -758,7 +758,7 @@ DeviceIoPciRead (
 \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
@@ -805,7 +805,7 @@ DeviceIoPciWrite (
 \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
@@ -1029,7 +1029,7 @@ DeviceIoMap (
 \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
@@ -1123,7 +1123,7 @@ DeviceIoAllocateBuffer (
     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