]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
OptionRomPkg FrameBufferBltLib: Fix build warning with ICC
[mirror_edk2.git] / OptionRomPkg / Library / FrameBufferBltLib / FrameBufferBltLib.c
index 5bb3cfbb28c0fa87ec88459e2150081b89d4bbac..cfd5212d482478eed64e68c986d11352f83fd0ed 100644 (file)
@@ -65,9 +65,8 @@ ConfigurePixelBitMaskFormat (
   }\r
   MergedMasks = (UINT32) (MergedMasks | Masks[3]);\r
 \r
-  mBltLibBytesPerPixel = HighBitSet32 (MergedMasks);\r
-  ASSERT (mBltLibBytesPerPixel >= 0);\r
-  mBltLibBytesPerPixel = (mBltLibBytesPerPixel + 7) / 8;\r
+  ASSERT (MergedMasks != 0);\r
+  mBltLibBytesPerPixel = (HighBitSet32 (MergedMasks) + 7) / 8;\r
 \r
   DEBUG ((EFI_D_INFO, "Bytes per pixel: %d\n", mBltLibBytesPerPixel));\r
 \r