From 270e8dfd860199613f7d6e6e3357ed6175f8c6bf Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Tue, 16 Jul 2013 02:11:24 +0000 Subject: Fixes the GCC build 'Unused variable' warning (raised an error when warnings are treated as errors). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin Reviewed-by: Eric Dong git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14470 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 54 ++++++++++++++------------------ 1 file changed, 24 insertions(+), 30 deletions(-) (limited to 'MdeModulePkg/Library/UefiHiiLib') diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c index 87aeb947ae..4ef64428bb 100644 --- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c @@ -998,13 +998,12 @@ ValidateQuestionFromVfr ( IN CHAR16 *RequestElement, IN EFI_HII_HANDLE HiiHandle, IN BOOLEAN NameValueType - ) -{ - IFR_BLOCK_DATA VarBlockData; - UINT8 *TmpBuffer; - UINT16 Offset; - UINT16 Width; - UINT64 VarValue; + ) +{ + IFR_BLOCK_DATA VarBlockData; + UINT16 Offset; + UINT16 Width; + UINT64 VarValue; EFI_IFR_TYPE_VALUE TmpValue; EFI_STATUS Status; EFI_HII_PACKAGE_HEADER PacakgeHeader; @@ -1029,13 +1028,12 @@ ValidateQuestionFromVfr ( // // Initialize the local variables. // - Index = 0; - VarStoreName = NULL; - Status = EFI_SUCCESS; - TmpBuffer = NULL; - VarValue = 0; - IfrVarStore = NULL; - IfrNameValueStore = NULL; + Index = 0; + VarStoreName = NULL; + Status = EFI_SUCCESS; + VarValue = 0; + IfrVarStore = NULL; + IfrNameValueStore = NULL; IfrEfiVarStore = NULL; ZeroMem (&VarStoreData, sizeof (IFR_VARSTORAGE_DATA)); ZeroMem (&VarBlockData, sizeof (VarBlockData)); @@ -1583,22 +1581,18 @@ GetBlockDataInfo ( UINT8 *TmpBuffer; UINT16 Offset; UINT16 Width; - LIST_ENTRY *Link; - UINTN MaxBufferSize; - EFI_STATUS Status; - CHAR8 *VarStoreName; - UINTN Index; - IFR_BLOCK_DATA *BlockArray; - UINT8 *DataBuffer; - - // - // Initialize the local variables. - // - Index = 0; - VarStoreName = NULL; - Status = EFI_SUCCESS; - BlockData = NULL; - NewBlockData = NULL; + LIST_ENTRY *Link; + UINTN MaxBufferSize; + EFI_STATUS Status; + IFR_BLOCK_DATA *BlockArray; + UINT8 *DataBuffer; + + // + // Initialize the local variables. + // + Status = EFI_SUCCESS; + BlockData = NULL; + NewBlockData = NULL; TmpBuffer = NULL; BlockArray = NULL; MaxBufferSize = HII_LIB_DEFAULT_VARSTORE_SIZE; -- cgit v1.2.3