* [PATCH v1] BaseTools/GenFds: remove function parameter
@ 2018-09-14 16:26 Jaben Carsey
0 siblings, 0 replies; only message in thread
From: Jaben Carsey @ 2018-09-14 16:26 UTC (permalink / raw)
To: edk2-devel; +Cc: Yonghong Zhu, Liming Gao, Bob C Feng
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.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob C Feng <bob.c.feng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-09-14 16:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-14 16:26 [PATCH v1] BaseTools/GenFds: remove function parameter Jaben Carsey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox