Refine some code to make code run safely.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10873 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10
2010-09-13 10:46:02 +00:00
parent 0a16169be8
commit 52fb4d3d13
5 changed files with 11 additions and 11 deletions

View File

@@ -45,5 +45,5 @@ GetPowerOfTwo64 (
return 0;
}
return LShiftU64 (1, HighBitSet64 (Operand));
return LShiftU64 (1, (UINTN) HighBitSet64 (Operand));
}

View File

@@ -424,7 +424,7 @@ BasePrintLibVSPrint (
ArgumentString = StatusString [Index + WARNING_STATUS_NUMBER];
}
} else {
Index = Status;
Index = (UINTN) Status;
if (Index <= WARNING_STATUS_NUMBER) {
ArgumentString = StatusString [Index];
}