Add explicit type cast to suppress possible warning of precession loss.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10786 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xli24
2010-08-10 07:47:20 +00:00
parent 3af91e23cb
commit 13314ba32a
5 changed files with 10 additions and 10 deletions

View File

@@ -499,7 +499,7 @@ BdsLibVariableToOption (
// Unicode stream to ASCII without any loss in meaning.
//
if (*VariableName == 'B') {
NumOff = sizeof (L"Boot")/sizeof(CHAR16) -1 ;
NumOff = (UINT8) (sizeof (L"Boot") / sizeof(CHAR16) - 1);
Option->BootCurrent = (UINT16) ((VariableName[NumOff] -'0') * 0x1000);
Option->BootCurrent = (UINT16) (Option->BootCurrent + ((VariableName[NumOff+1]-'0') * 0x100));
Option->BootCurrent = (UINT16) (Option->BootCurrent + ((VariableName[NumOff+2]-'0') * 0x10));