MdeModulePkg HiiDataBaseDxe: Initialize the local variable before reference
authorLiming Gao <liming.gao@intel.com>
Mon, 25 Dec 2017 10:24:19 +0000 (18:24 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 25 Dec 2017 10:47:15 +0000 (18:47 +0800)
Make VS2012x86 and GCC48 pass build

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
MdeModulePkg/Universal/HiiDatabaseDxe/Database.c

index ffcd9ec..7441c19 100644 (file)
@@ -739,6 +739,8 @@ FindQuestionDefaultSetting (
   if (VariableHeader == NULL) {\r
     return EFI_NOT_FOUND;\r
   }\r
+  StartBit   = 0;\r
+  EndBit     = 0;\r
   ByteOffset = IfrQuestionHdr->VarStoreInfo.VarOffset;\r
   if (BitFieldQuestion) {\r
     BitOffset  = IfrQuestionHdr->VarStoreInfo.VarOffset;\r
@@ -818,6 +820,7 @@ UpdateDefaultSettingInFormPackage (
 \r
   ZeroMem (&VarStoreQuestionHeader, sizeof (VarStoreQuestionHeader));\r
   PackageLength = FormPackage->FormPkgHdr.Length - sizeof (EFI_HII_PACKAGE_HEADER);\r
+  Width         = 0;\r
   IfrOffset     = 0;\r
   IfrScope      = 0;\r
   IfrOpHdr      = (EFI_IFR_OP_HEADER *) FormPackage->IfrData;\r