diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-07-16 03:06:59 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-07-16 03:06:59 +0000 |
commit | 1db1f6adb4591671c044dc18d82f89845c60ecfa (patch) | |
tree | 915926e5db3b9e9177b0e68ea3b3bb17a66d3e4e /MdePkg/Library | |
parent | cfb9b643f74f52183ef1022aaf24534b0ea78e47 (diff) | |
download | edk2-platforms-1db1f6adb4591671c044dc18d82f89845c60ecfa.tar.xz |
Clean up IfrSupportLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5487 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library')
-rw-r--r-- | MdePkg/Library/HiiLib/HiiLib.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/IfrSupportLib/UefiIfrForm.c | 25 |
2 files changed, 16 insertions, 11 deletions
diff --git a/MdePkg/Library/HiiLib/HiiLib.c b/MdePkg/Library/HiiLib/HiiLib.c index a178012b6e..be3a31704d 100644 --- a/MdePkg/Library/HiiLib/HiiLib.c +++ b/MdePkg/Library/HiiLib/HiiLib.c @@ -78,7 +78,7 @@ EFI_HII_PACKAGE_LIST_HEADER * InternalHiiLibPreparePackages (
IN UINTN NumberOfPackages,
IN CONST EFI_GUID *GuidId,
- VA_LIST Marker
+ IN VA_LIST Marker
)
{
EFI_HII_PACKAGE_LIST_HEADER *PackageListHeader;
diff --git a/MdePkg/Library/IfrSupportLib/UefiIfrForm.c b/MdePkg/Library/IfrSupportLib/UefiIfrForm.c index d0da744240..179fc1cb9f 100644 --- a/MdePkg/Library/IfrSupportLib/UefiIfrForm.c +++ b/MdePkg/Library/IfrSupportLib/UefiIfrForm.c @@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // Fake <ConfigHdr> // -UINT16 mFakeConfigHdr[] = L"GUID=00000000000000000000000000000000&NAME=0000&PATH=0"; +GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT16 mFakeConfigHdr[] = L"GUID=00000000000000000000000000000000&NAME=0000&PATH=0"; /** Draw a dialog and return the selected key. @@ -26,7 +26,7 @@ UINT16 mFakeConfigHdr[] = L"GUID=00000000000000000000000000000000&NAME=0000&PATH @param NumberOfLines The number of lines for the dialog box @param KeyValue The EFI_KEY value returned if HotKey is TRUE.. @param String Pointer to the first string in the list - @param ... A series of (quantity == NumberOfLines) text + @param ... A series of (quantity == NumberOfLines - 1) text strings which will be used to construct the dialog box @@ -109,6 +109,7 @@ IfrLibCreatePopUp ( LargestString = StringLen; } } + VA_END (Marker); if ((LargestString + 2) > DimensionsWidth) { LargestString = DimensionsWidth - 2; @@ -250,6 +251,7 @@ SwapBuffer ( **/ VOID +EFIAPI ToLower ( IN OUT CHAR16 *Str ) @@ -292,7 +294,7 @@ BufferToHexString ( StrBufferLen = BufferSize * sizeof (CHAR16) + 1; Status = BufToHexString (Str, &StrBufferLen, NewBuffer, BufferSize); - gBS->FreePool (NewBuffer); + FreePool (NewBuffer); // // Convert the uppercase to lowercase since <HexAf> is defined in lowercase format. // @@ -354,6 +356,7 @@ HexStringToBuffer ( **/ EFI_STATUS +EFIAPI ConfigStringToUnicode ( IN OUT CHAR16 *UnicodeString, IN OUT UINTN *StrBufferLen, @@ -413,6 +416,7 @@ ConfigStringToUnicode ( **/ EFI_STATUS +EFIAPI UnicodeToConfigString ( IN OUT CHAR16 *ConfigString, IN OUT UINTN *StrBufferLen, @@ -566,6 +570,7 @@ ConstructConfigHdr ( **/ BOOLEAN +EFIAPI FindBlockName ( IN OUT CHAR16 *String, UINTN Offset, @@ -644,7 +649,7 @@ GetBrowserData ( ) { EFI_STATUS Status; - CHAR16 *ConfigHdr; + CONST CHAR16 *ConfigHdr; CHAR16 *ConfigResp; CHAR16 *StringPtr; UINTN HeaderLen; @@ -688,7 +693,7 @@ GetBrowserData ( VariableName ); if (Status == EFI_BUFFER_TOO_SMALL) { - gBS->FreePool (ConfigResp); + FreePool (ConfigResp); ConfigResp = AllocateZeroPool (BufferLen + HeaderLen); StringPtr = ConfigResp + HeaderLen; @@ -705,7 +710,7 @@ GetBrowserData ( ); } if (EFI_ERROR (Status)) { - gBS->FreePool (ConfigResp); + FreePool (ConfigResp); return Status; } CopyMem (ConfigResp, ConfigHdr, HeaderLen * sizeof (UINT16)); @@ -720,7 +725,7 @@ GetBrowserData ( BufferSize, &Progress ); - gBS->FreePool (ConfigResp); + FreePool (ConfigResp); return Status; } @@ -756,7 +761,7 @@ SetBrowserData ( ) { EFI_STATUS Status; - CHAR16 *ConfigHdr; + CONST CHAR16 *ConfigHdr; CHAR16 *ConfigResp; CHAR16 *StringPtr; UINTN HeaderLen; @@ -825,7 +830,7 @@ SetBrowserData ( &Progress ); if (EFI_ERROR (Status)) { - gBS->FreePool (ConfigResp); + FreePool (ConfigResp); return Status; } @@ -845,6 +850,6 @@ SetBrowserData ( NULL, NULL ); - gBS->FreePool (ConfigResp); + FreePool (ConfigResp); return Status; } |