]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430GraphicsOutput.c
Fix comparisons of enumerated types which may cause warnings for some compilers.
[mirror_edk2.git] / OptionRomPkg / CirrusLogic5430Dxe / CirrusLogic5430GraphicsOutput.c
index 8ba2f98cb974a926e2b31c756ecbf13d5e0bd49d..4550b25010477fc281822b419594c36e327f1897 100644 (file)
@@ -1,5 +1,5 @@
 /** @file\r
-Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 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
@@ -240,7 +240,7 @@ Returns:
 \r
   Private = CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_GRAPHICS_OUTPUT_THIS (This);\r
 \r
-  if ((BltOperation < 0) || (BltOperation >= EfiGraphicsOutputBltOperationMax)) {\r
+  if ((UINT32)BltOperation >= EfiGraphicsOutputBltOperationMax) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -523,6 +523,7 @@ CirrusLogic5430GraphicsOutputConstructor (
   // Initialize the hardware\r
   //\r
   GraphicsOutput->SetMode (GraphicsOutput, 0);\r
+  ASSERT (Private->GraphicsOutput.Mode->Mode < CIRRUS_LOGIC_5430_MODE_COUNT);\r
   DrawLogo (\r
     Private,\r
     Private->ModeData[Private->GraphicsOutput.Mode->Mode].HorizontalResolution,\r