From fd776d390d63926dad53fb8addcfdbfc76f793b0 Mon Sep 17 00:00:00 2001 From: ydong10 Date: Mon, 25 Apr 2011 06:18:10 +0000 Subject: Refine code to make code run more safely. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11583 6f19259b-4bc3-4df7-8a09-765794883524 --- OptionRomPkg/Application/BltLibSample/BltLibSample.c | 2 +- OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OptionRomPkg') diff --git a/OptionRomPkg/Application/BltLibSample/BltLibSample.c b/OptionRomPkg/Application/BltLibSample/BltLibSample.c index 300b9ee117..29f270c3f4 100644 --- a/OptionRomPkg/Application/BltLibSample/BltLibSample.c +++ b/OptionRomPkg/Application/BltLibSample/BltLibSample.c @@ -40,7 +40,7 @@ Rand32 ( ) { UINTN Found; - UINTN Bits; + INTN Bits; UINT64 Tsc1; UINT64 Tsc2; UINT64 TscBits; diff --git a/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c b/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c index cfd5212d48..2df840af15 100644 --- a/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c +++ b/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c @@ -66,7 +66,7 @@ ConfigurePixelBitMaskFormat ( MergedMasks = (UINT32) (MergedMasks | Masks[3]); ASSERT (MergedMasks != 0); - mBltLibBytesPerPixel = (HighBitSet32 (MergedMasks) + 7) / 8; + mBltLibBytesPerPixel = (UINTN) ((HighBitSet32 (MergedMasks) + 7) / 8); DEBUG ((EFI_D_INFO, "Bytes per pixel: %d\n", mBltLibBytesPerPixel)); -- cgit v1.2.3