From: Jaben Carsey <jaben.carsey@intel.com>
To: edk2-devel@lists.01.org
Cc: Yonghong Zhu <yonghong.zhu@intel.com>,
Liming Gao <liming.gao@intel.com>,
Bob C Feng <bob.c.feng@intel.com>
Subject: [PATCH v1] BaseTools/GenFds: remove function parameter
Date: Fri, 14 Sep 2018 09:26:54 -0700 [thread overview]
Message-ID: <6dccf4bf855c8dafff9d735e886edf341d3080c0.1536942360.git.jaben.carsey@intel.com> (raw)
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
reply other threads:[~2018-09-14 16:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6dccf4bf855c8dafff9d735e886edf341d3080c0.1536942360.git.jaben.carsey@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox