]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
BaseTools/VfrCompile: Initialize local variables before being used
[mirror_edk2.git] / BaseTools / Source / C / VfrCompile / VfrFormPkg.cpp
index aa27ce0be72e0682bbda0e9183eaa7bfb3969079..124b8e8e726d6b585fe82dfbab15eca3488e751c 100644 (file)
@@ -825,7 +825,7 @@ CFormPkg::DeclarePendingQuestion (
   CHAR8          FName[MAX_NAME_LEN];\r
   CHAR8          *SName;\r
   CHAR8          *NewStr;\r
-  UINT32         ShrinkSize;\r
+  UINT32         ShrinkSize = 0;\r
   EFI_VFR_RETURN_CODE  ReturnCode;\r
   EFI_VFR_VARSTORE_TYPE VarStoreType  = EFI_VFR_VARSTORE_INVALID;\r
   EFI_VARSTORE_ID       VarStoreId    = EFI_VARSTORE_ID_INVALID;\r
@@ -1297,6 +1297,7 @@ CIfrRecordInfoDB::IfrAdjustDynamicOpcodeInRecords (
   SIfrRecord         *pAdjustNode, *pNodeBeforeAdjust;\r
   SIfrRecord         *pNodeBeforeDynamic;\r
 \r
+  pPreNode            = NULL;\r
   pAdjustNode         = NULL;\r
   pNodeBeforeDynamic  = NULL;\r
   OpcodeOffset        = 0;\r
@@ -1845,6 +1846,7 @@ CIfrRecordInfoDB::IfrCreateDefaultForQuestion (
     // Point to the first expression opcode.\r
     //\r
     pSNode = pDefaultNode->mNext;\r
+    pENode = NULL;\r
     ScopeCount++;\r
     //\r
     // Get opcode number behind the EFI_IFR_DEFAULT_2 until reach its END opcode (including the END opcode of EFI_IFR_DEFAULT_2)\r