From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BA2A321962301 for ; Fri, 14 Sep 2018 09:27:08 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Sep 2018 09:27:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,374,1531810800"; d="scan'208";a="90516216" Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga001.jf.intel.com with ESMTP; 14 Sep 2018 09:27:02 -0700 From: Jaben Carsey To: edk2-devel@lists.01.org Cc: Yonghong Zhu , Liming Gao , Bob C Feng Date: Fri, 14 Sep 2018 09:26:54 -0700 Message-Id: <6dccf4bf855c8dafff9d735e886edf341d3080c0.1536942360.git.jaben.carsey@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Subject: [PATCH v1] BaseTools/GenFds: remove function parameter X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2018 16:27:08 -0000 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 Cc: Liming Gao Cc: Bob C Feng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- 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