From: jljusten Date: Fri, 22 Apr 2011 22:22:05 +0000 (+0000) Subject: OptionRomPkg FrameBufferBltLib: Fix build warning with ICC X-Git-Tag: edk2-stable201903~14922 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=8990b82f4fdf58420ffdb0f7f1a9c100aac8c1ae OptionRomPkg FrameBufferBltLib: Fix build warning with ICC mBltLibBytesPerPixel is UINTN, and therefore it will always be >= 0. Instead an ASSERT is used to verify that MergedMasks is non-zero. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11581 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c b/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c index 5bb3cfbb28..cfd5212d48 100644 --- a/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c +++ b/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c @@ -65,9 +65,8 @@ ConfigurePixelBitMaskFormat ( } MergedMasks = (UINT32) (MergedMasks | Masks[3]); - mBltLibBytesPerPixel = HighBitSet32 (MergedMasks); - ASSERT (mBltLibBytesPerPixel >= 0); - mBltLibBytesPerPixel = (mBltLibBytesPerPixel + 7) / 8; + ASSERT (MergedMasks != 0); + mBltLibBytesPerPixel = (HighBitSet32 (MergedMasks) + 7) / 8; DEBUG ((EFI_D_INFO, "Bytes per pixel: %d\n", mBltLibBytesPerPixel));