diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-13 06:52:56 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-13 06:52:56 +0000 |
commit | 5c1ebff6b6b160c0f8c7e0c6cfb2488b47657df0 (patch) | |
tree | c726e1572c9470f8595b4c3dcacc9d7f261bfca0 | |
parent | 785a12147c3bf80bb402109fb1f53d04a45d8b53 (diff) | |
download | edk2-platforms-5c1ebff6b6b160c0f8c7e0c6cfb2488b47657df0.tar.xz |
Fix ICC compiler error.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8071 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c index 6c2cd91184..997e36aeb1 100644 --- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c @@ -700,7 +700,7 @@ InternalHiiLowerConfigString ( } else if (*String == L'&') {
Lower = FALSE;
} else if (Lower && *String > L'A' && *String <= L'F') {
- *String = *String - L'A' + L'a';
+ *String = (CHAR16) (*String - L'A' + L'a');
}
}
@@ -1093,6 +1093,8 @@ HiiConstructConfigAltResp ( VA_LIST Args;
UINTN AltCfgId;
UINT16 Width;
+ UINT16 OffsetValue;
+ UINT16 WidthValue;
ASSERT (Guid != NULL);
ASSERT (Name != NULL);
@@ -1156,13 +1158,16 @@ HiiConstructConfigAltResp ( //
// Append &OFFSET=XXXX&WIDTH=YYYY
//
+ OffsetValue = ReadUnaligned16 ((UINT16 *)Buffer);
+ WidthValue = ReadUnaligned16 ((UINT16 *)(Buffer + sizeof (UINT16)));
UnicodeSPrint (
String,
(8 + 4 + 7 + 4) * sizeof (CHAR16),
L"&OFFSET=%04X&WIDTH=%04X",
- ReadUnaligned16 ((UINT16 *)Buffer),
- ReadUnaligned16 ((UINT16 *)(Buffer + sizeof (UINT16)))
- );
+ OffsetValue,
+ WidthValue
+ );
+
String += StrLen (String);
Buffer += (sizeof (UINT16) + sizeof (UINT16));
}
@@ -1491,9 +1496,10 @@ HiiGetBrowserData ( }
//
- // Construct <ConfigResp>
+ // Construct <ConfigResp> mConfigHdrTemplate L'&' ResultsData L'\0'
//
- Size = (StrLen (mConfigHdrTemplate) + 1 + StrLen (ResultsData) + 1) * sizeof (CHAR16);
+ Size = (StrLen (mConfigHdrTemplate) + 1) * sizeof (CHAR16);
+ Size = Size + (StrLen (ResultsData) + 1) * sizeof (CHAR16);
ConfigResp = AllocateZeroPool (Size);
UnicodeSPrint (ConfigResp, Size, L"%s&%s", mConfigHdrTemplate, ResultsData);
@@ -1568,7 +1574,8 @@ HiiSetBrowserData ( // Allocate and fill a buffer large enough to hold the <ConfigHdr> template
// followed by <RequestElement> followed by a Null-terminator
//
- Size = (StrLen (mConfigHdrTemplate) + StrLen (RequestElement) + 1) * sizeof (CHAR16);
+ Size = StrLen (mConfigHdrTemplate) * sizeof (CHAR16);
+ Size = Size + (StrLen (RequestElement) + 1) * sizeof (CHAR16);
ConfigRequest = AllocateZeroPool (Size);
UnicodeSPrint (ConfigRequest, Size, L"%s%s", mConfigHdrTemplate, RequestElement);
}
@@ -1957,7 +1964,7 @@ HiiCreateGuidOpCode ( ASSERT (OpCodeSize >= sizeof (OpCode));
ZeroMem (&OpCode, sizeof (OpCode));
- CopyGuid (&OpCode.Guid, Guid);
+ CopyGuid ((EFI_GUID *)(VOID *)&OpCode.Guid, Guid);
OpCodePointer = (EFI_IFR_GUID *)InternalHiiCreateOpCodeExtended (
OpCodeHandle,
|