From 8990b82f4fdf58420ffdb0f7f1a9c100aac8c1ae Mon Sep 17 00:00:00 2001 From: jljusten Date: Fri, 22 Apr 2011 22:22:05 +0000 Subject: [PATCH] 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 --- OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)); -- 2.39.2