]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
VfrCompile: fix invalid comparison between pointer and integer
[mirror_edk2.git] / BaseTools / Source / C / VfrCompile / VfrFormPkg.cpp
index 9c76b29418e08f9cf6ad19f4350a1aea46763e3b..2be0c385e31371a28ce542ec78f166907301fff5 100644 (file)
@@ -113,6 +113,7 @@ CFormPkg::CFormPkg (
   }\r
   BufferStart = new CHAR8[BufferSize];\r
   if (BufferStart == NULL) {\r
+    delete Node;\r
     return;\r
   }\r
   BufferEnd   = BufferStart + BufferSize;\r
@@ -828,7 +829,6 @@ CFormPkg::DeclarePendingQuestion (
   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
 \r
   //\r
   // Declare all questions as Numeric in DisableIf True\r
@@ -1365,7 +1365,7 @@ CIfrRecordInfoDB::IfrUpdateRecordInfoForDynamicOpcode (
   // Base on the original offset info to update the record list.\r
   //\r
   if (!IfrAdjustDynamicOpcodeInRecords(CreateOpcodeAfterParsingVfr)) {\r
-    gCVfrErrorHandle.PrintMsg (0, "Error", "Can not find the adjust offset in the record.");\r
+    gCVfrErrorHandle.PrintMsg (0, (CHAR8 *)"Error", (CHAR8 *)"Can not find the adjust offset in the record.");\r
   }\r
 \r
   //\r
@@ -1410,7 +1410,6 @@ CIfrRecordInfoDB::IfrRecordAdjust (
   EFI_QUESTION_ID    QuestionId;\r
   UINT32             StackCount;\r
   UINT32             QuestionScope;\r
-  UINT32             OpcodeOffset;\r
   CHAR8              ErrorMsg[MAX_STRING_LEN] = {0, };\r
   EFI_VFR_RETURN_CODE  Status;\r
 \r