Currently __GetAprioriSection has a parameter default to {}, which is incorrect. Since the parameter is updated in the function but not used and none of the callers of the function pass in a dictionary that is later used, just remove the parameter entirely.
Cc: Yonghong Zhu <yonghong....@intel.com> Cc: Liming Gao <liming....@intel.com> Cc: Bob C Feng <bob.c.f...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/GenFds/FdfParser.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index 1f7d59bb51..e8b6aa09df 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -2174,8 +2174,8 @@ class FdfParser: if FvObj.FvNameString == 'TRUE' and not FvObj.FvNameGuid: raise Warning("FvNameString found but FvNameGuid was not found", self.FileName, self.CurrentLineNumber) - self.__GetAprioriSection(FvObj, FvObj.DefineVarDict.copy()) - self.__GetAprioriSection(FvObj, FvObj.DefineVarDict.copy()) + self.__GetAprioriSection(FvObj) + self.__GetAprioriSection(FvObj) while True: isInf = self.__GetInfStatement(FvObj) @@ -2424,7 +2424,7 @@ class FdfParser: # @retval True Successfully find apriori statement # @retval False Not able to find apriori statement # - def __GetAprioriSection(self, FvObj, MacroDict = {}): + def __GetAprioriSection(self, FvObj): if not self.__IsKeyword( "APRIORI"): return False @@ -2440,7 +2440,6 @@ class FdfParser: AprSectionObj.AprioriType = AprType self.__GetDefineStatements(AprSectionObj) - MacroDict.update(AprSectionObj.DefineVarDict) while True: IsInf = self.__GetInfStatement(AprSectionObj) @@ -2844,8 +2843,8 @@ class FdfParser: self.__GetDefineStatements(FfsFileObj) Dict.update(FfsFileObj.DefineVarDict) - self.__GetAprioriSection(FfsFileObj, Dict.copy()) - self.__GetAprioriSection(FfsFileObj, Dict.copy()) + self.__GetAprioriSection(FfsFileObj) + self.__GetAprioriSection(FfsFileObj) while True: IsLeafSection = self.__GetLeafSection(FfsFileObj, Dict) @@ -2941,8 +2940,8 @@ class FdfParser: self.__GetSetStatements(FvObj) self.__GetFvAlignment(FvObj) self.__GetFvAttributes(FvObj) - self.__GetAprioriSection(FvObj, MacroDict.copy()) - self.__GetAprioriSection(FvObj, MacroDict.copy()) + self.__GetAprioriSection(FvObj) + self.__GetAprioriSection(FvObj) while True: IsInf = self.__GetInfStatement(FvObj) -- 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel