Fix ICC build warning.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7367 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2009-01-24 06:19:47 +00:00
parent 0ba7fffd25
commit ca835f4176
1 changed files with 5 additions and 4 deletions

View File

@ -691,6 +691,7 @@ UpdateConModePage (
UINTN Row; UINTN Row;
CHAR16 RowString[50]; CHAR16 RowString[50];
CHAR16 ModeString[50]; CHAR16 ModeString[50];
UINTN TempStringLen;
UINTN MaxMode; UINTN MaxMode;
UINTN ValidMode; UINTN ValidMode;
EFI_STRING_ID *ModeToken; EFI_STRING_ID *ModeToken;
@ -745,11 +746,11 @@ UpdateConModePage (
// //
// Build mode string Column x Row // Build mode string Column x Row
// //
UnicodeValueToString (ModeString, 0, Col, 0); TempStringLen = UnicodeValueToString (ModeString, 0, Col, 0);
ASSERT ((StrLen (ModeString) + 1) < (sizeof (ModeString) / sizeof (ModeString[0]))); ASSERT ((TempStringLen + StrLen (L" x ")) < (sizeof (ModeString) / sizeof (ModeString[0])));
StrCat (ModeString, L" x "); StrCat (ModeString, L" x ");
UnicodeValueToString (RowString, 0, Row, 0); TempStringLen = UnicodeValueToString (RowString, 0, Row, 0);
ASSERT ((StrLen (ModeString) + StrLen(RowString)) < (sizeof (ModeString) / sizeof (ModeString[0]))); ASSERT ((StrLen (ModeString) + TempStringLen) < (sizeof (ModeString) / sizeof (ModeString[0])));
StrCat (ModeString, RowString); StrCat (ModeString, RowString);
HiiLibNewString (CallbackData->BmmHiiHandle, &ModeToken[Index], ModeString); HiiLibNewString (CallbackData->BmmHiiHandle, &ModeToken[Index], ModeString);