From ca835f41761a785faf5f2c156da10527d3a92632 Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Sat, 24 Jan 2009 06:19:47 +0000 Subject: Fix ICC build warning. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7367 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint') diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c index 9fa2556cd5..4be68a0e06 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c @@ -691,6 +691,7 @@ UpdateConModePage ( UINTN Row; CHAR16 RowString[50]; CHAR16 ModeString[50]; + UINTN TempStringLen; UINTN MaxMode; UINTN ValidMode; EFI_STRING_ID *ModeToken; @@ -745,11 +746,11 @@ UpdateConModePage ( // // Build mode string Column x Row // - UnicodeValueToString (ModeString, 0, Col, 0); - ASSERT ((StrLen (ModeString) + 1) < (sizeof (ModeString) / sizeof (ModeString[0]))); + TempStringLen = UnicodeValueToString (ModeString, 0, Col, 0); + ASSERT ((TempStringLen + StrLen (L" x ")) < (sizeof (ModeString) / sizeof (ModeString[0]))); StrCat (ModeString, L" x "); - UnicodeValueToString (RowString, 0, Row, 0); - ASSERT ((StrLen (ModeString) + StrLen(RowString)) < (sizeof (ModeString) / sizeof (ModeString[0]))); + TempStringLen = UnicodeValueToString (RowString, 0, Row, 0); + ASSERT ((StrLen (ModeString) + TempStringLen) < (sizeof (ModeString) / sizeof (ModeString[0]))); StrCat (ModeString, RowString); HiiLibNewString (CallbackData->BmmHiiHandle, &ModeToken[Index], ModeString); -- cgit v1.2.3