Fixes the GCC build 'Unused variable' warning (raised an error when warnings are...
authorOlivier Martin <olivier.martin@arm.com>
Tue, 16 Jul 2013 02:11:24 +0000 (02:11 +0000)
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 16 Jul 2013 02:11:24 +0000 (02:11 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14470 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Library/UefiHiiLib/HiiLib.c
MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c

index 87aeb947ae50134543b879e34b7516d3c58d4a3c..4ef64428bb37eb1d0ee895f607a1a05899674597 100644 (file)
@@ -998,13 +998,12 @@ ValidateQuestionFromVfr (
   IN CHAR16                        *RequestElement,\r
   IN EFI_HII_HANDLE                HiiHandle,\r
   IN BOOLEAN                       NameValueType\r
-  )\r
-{\r
-  IFR_BLOCK_DATA               VarBlockData;\r
-  UINT8                        *TmpBuffer;\r
-  UINT16                       Offset;\r
-  UINT16                       Width;\r
-  UINT64                       VarValue;\r
+  )
+{
+  IFR_BLOCK_DATA               VarBlockData;
+  UINT16                       Offset;
+  UINT16                       Width;
+  UINT64                       VarValue;
   EFI_IFR_TYPE_VALUE           TmpValue;\r
   EFI_STATUS                   Status;\r
   EFI_HII_PACKAGE_HEADER       PacakgeHeader;\r
@@ -1029,13 +1028,12 @@ ValidateQuestionFromVfr (
   //\r
   // Initialize the local variables.\r
   //\r
-  Index             = 0;\r
-  VarStoreName      = NULL;\r
-  Status            = EFI_SUCCESS;\r
-  TmpBuffer         = NULL;\r
-  VarValue          = 0;\r
-  IfrVarStore       = NULL;\r
-  IfrNameValueStore = NULL;\r
+  Index             = 0;
+  VarStoreName      = NULL;
+  Status            = EFI_SUCCESS;
+  VarValue          = 0;
+  IfrVarStore       = NULL;
+  IfrNameValueStore = NULL;
   IfrEfiVarStore    = NULL;\r
   ZeroMem (&VarStoreData, sizeof (IFR_VARSTORAGE_DATA));\r
   ZeroMem (&VarBlockData, sizeof (VarBlockData));\r
@@ -1583,22 +1581,18 @@ GetBlockDataInfo (
   UINT8                        *TmpBuffer;\r
   UINT16                       Offset;\r
   UINT16                       Width;\r
-  LIST_ENTRY                   *Link;\r
-  UINTN                        MaxBufferSize;\r
-  EFI_STATUS                   Status;\r
-  CHAR8                        *VarStoreName;\r
-  UINTN                        Index;\r
-  IFR_BLOCK_DATA               *BlockArray;\r
-  UINT8                        *DataBuffer;\r
-  \r
-  //\r
-  // Initialize the local variables.\r
-  //\r
-  Index         = 0;\r
-  VarStoreName  = NULL;\r
-  Status        = EFI_SUCCESS;\r
-  BlockData     = NULL;\r
-  NewBlockData  = NULL;\r
+  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;\r
   BlockArray    = NULL;\r
   MaxBufferSize = HII_LIB_DEFAULT_VARSTORE_SIZE;\r
index a83a2ff77779dfebfc39f24776a838ef2019e7a4..95ca8d4777fd0ebc80093be3348adb2b13091fad 100644 (file)
@@ -1430,26 +1430,18 @@ ParseIfrData (
   IFR_DEFAULT_DATA         DefaultData;\r
   IFR_DEFAULT_DATA         *DefaultDataPtr;\r
   IFR_BLOCK_DATA           *BlockData;\r
-  CHAR16                   *VarStoreName;\r
-  UINT16                   VarWidth;\r
-  UINT16                   VarDefaultId;\r
-  EFI_STRING               GuidStr;\r
-  EFI_STRING               NameStr;\r
-  EFI_STRING               TempStr;\r
-  UINTN                    LengthString;\r
-  BOOLEAN                  FirstOneOfOption;\r
-  LIST_ENTRY               *LinkData;\r
-  LIST_ENTRY               *LinkDefault;\r
-  EFI_IFR_VARSTORE_NAME_VALUE *IfrNameValueVarStore;\r
-\r
-  LengthString     = 0;\r
-  Status           = EFI_SUCCESS;\r
-  GuidStr          = NULL;\r
-  NameStr          = NULL;\r
-  TempStr          = NULL;\r
-  BlockData        = NULL;\r
-  DefaultDataPtr   = NULL;\r
-  FirstOneOfOption = FALSE;\r
+  CHAR16                   *VarStoreName;
+  UINT16                   VarWidth;
+  UINT16                   VarDefaultId;
+  BOOLEAN                  FirstOneOfOption;
+  LIST_ENTRY               *LinkData;
+  LIST_ENTRY               *LinkDefault;
+  EFI_IFR_VARSTORE_NAME_VALUE *IfrNameValueVarStore;
+
+  Status           = EFI_SUCCESS;
+  BlockData        = NULL;
+  DefaultDataPtr   = NULL;
+  FirstOneOfOption = FALSE;
   ZeroMem (&DefaultData, sizeof (IFR_DEFAULT_DATA));\r
 \r
   //\r
@@ -2872,13 +2864,12 @@ GetFullStringFromHiiFormPackages (
   IFR_DEFAULT_DATA             *DefaultIdArray;\r
   IFR_VARSTORAGE_DATA          *VarStorageData;\r
   EFI_STRING                   DefaultAltCfgResp;\r
-  EFI_STRING                   ConfigHdr;\r
-  EFI_STRING                   StringPtr;\r
-  EFI_STRING                   Progress;\r
-  BOOLEAN                      DataExist;\r
-\r
-  if (DataBaseRecord == NULL || DevicePath == NULL || Request == NULL || AltCfgResp == NULL) {\r
-    return EFI_INVALID_PARAMETER;\r
+  EFI_STRING                   ConfigHdr;
+  EFI_STRING                   StringPtr;
+  EFI_STRING                   Progress;
+
+  if (DataBaseRecord == NULL || DevicePath == NULL || Request == NULL || AltCfgResp == NULL) {
+    return EFI_INVALID_PARAMETER;
   }\r
 \r
   //\r
@@ -2888,13 +2879,12 @@ GetFullStringFromHiiFormPackages (
   DefaultIdArray    = NULL;\r
   VarStorageData    = NULL;\r
   DefaultAltCfgResp = NULL;\r
-  ConfigHdr         = NULL;\r
-  HiiFormPackage    = NULL;\r
-  PackageSize       = 0;\r
-  DataExist         = FALSE;\r
-  Progress          = *Request;\r
-\r
-  Status = GetFormPackageData (DataBaseRecord, &HiiFormPackage, &PackageSize);\r
+  ConfigHdr         = NULL;
+  HiiFormPackage    = NULL;
+  PackageSize       = 0;
+  Progress          = *Request;
+
+  Status = GetFormPackageData (DataBaseRecord, &HiiFormPackage, &PackageSize);
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r