* [PATCH v1 1/1] BaseTools: UPT: remove unused variable and inaccessible code. [not found] <cover.1520864219.git.jaben.carsey@intel.com> @ 2018-03-12 14:24 ` Jaben Carsey 2018-03-13 6:42 ` Zhu, Yonghong 0 siblings, 1 reply; 2+ messages in thread From: Jaben Carsey @ 2018-03-12 14:24 UTC (permalink / raw) To: edk2-devel; +Cc: Yonghong Zhu, Liming Gao gINCLUDE_PATTERN is never used. IncList is always empty. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> --- BaseTools/Source/Python/UPT/Library/UniClassObject.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/BaseTools/Source/Python/UPT/Library/UniClassObject.py b/BaseTools/Source/Python/UPT/Library/UniClassObject.py index 1fbbf2e49887..9408e77484a0 100644 --- a/BaseTools/Source/Python/UPT/Library/UniClassObject.py +++ b/BaseTools/Source/Python/UPT/Library/UniClassObject.py @@ -47,8 +47,6 @@ NULL = u'\u0000' TAB = u'\t' BACK_SPLASH = u'\\' -gINCLUDE_PATTERN = re.compile("^!include[\s]+([\S]+)[\s]*$", re.MULTILINE | re.UNICODE) - gLANG_CONV_TABLE = {'eng':'en', 'fra':'fr', \ 'aar':'aa', 'abk':'ab', 'ave':'ae', 'afr':'af', 'aka':'ak', 'amh':'am', \ 'arg':'an', 'ara':'ar', 'asm':'as', 'ava':'av', 'aym':'ay', 'aze':'az', \ @@ -543,22 +541,6 @@ class UniFileClassObject(object): Line = Line.replace(u'\t', u' ') Line = Line.replace(u'\u0006', u'\\') - # IncList = gINCLUDE_PATTERN.findall(Line) - IncList = [] - if len(IncList) == 1: - for Dir in [File.Dir] + self.IncludePathList: - IncFile = PathClass(str(IncList[0]), Dir) - self.IncFileList.append(IncFile) - if os.path.isfile(IncFile.Path): - Lines.extend(self.PreProcess(IncFile, True)) - break - else: - EdkLogger.Error("Unicode File Parser", - ToolError.FILE_NOT_FOUND, - Message="Cannot find include file", - ExtraData=str(IncList[0])) - continue - # # Check if single line has correct '"' # -- 2.14.1.windows.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] BaseTools: UPT: remove unused variable and inaccessible code. 2018-03-12 14:24 ` [PATCH v1 1/1] BaseTools: UPT: remove unused variable and inaccessible code Jaben Carsey @ 2018-03-13 6:42 ` Zhu, Yonghong 0 siblings, 0 replies; 2+ messages in thread From: Zhu, Yonghong @ 2018-03-13 6:42 UTC (permalink / raw) To: Carsey, Jaben, edk2-devel@lists.01.org Cc: Gao, Liming, Chen, Hesheng, Zhu, Yonghong Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Best Regards, Zhu Yonghong -----Original Message----- From: Carsey, Jaben Sent: Monday, March 12, 2018 10:25 PM To: edk2-devel@lists.01.org Cc: Zhu, Yonghong <yonghong.zhu@intel.com>; Gao, Liming <liming.gao@intel.com> Subject: [PATCH v1 1/1] BaseTools: UPT: remove unused variable and inaccessible code. gINCLUDE_PATTERN is never used. IncList is always empty. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> --- BaseTools/Source/Python/UPT/Library/UniClassObject.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/BaseTools/Source/Python/UPT/Library/UniClassObject.py b/BaseTools/Source/Python/UPT/Library/UniClassObject.py index 1fbbf2e49887..9408e77484a0 100644 --- a/BaseTools/Source/Python/UPT/Library/UniClassObject.py +++ b/BaseTools/Source/Python/UPT/Library/UniClassObject.py @@ -47,8 +47,6 @@ NULL = u'\u0000' TAB = u'\t' BACK_SPLASH = u'\\' -gINCLUDE_PATTERN = re.compile("^!include[\s]+([\S]+)[\s]*$", re.MULTILINE | re.UNICODE) - gLANG_CONV_TABLE = {'eng':'en', 'fra':'fr', \ 'aar':'aa', 'abk':'ab', 'ave':'ae', 'afr':'af', 'aka':'ak', 'amh':'am', \ 'arg':'an', 'ara':'ar', 'asm':'as', 'ava':'av', 'aym':'ay', 'aze':'az', \ @@ -543,22 +541,6 @@ class UniFileClassObject(object): Line = Line.replace(u'\t', u' ') Line = Line.replace(u'\u0006', u'\\') - # IncList = gINCLUDE_PATTERN.findall(Line) - IncList = [] - if len(IncList) == 1: - for Dir in [File.Dir] + self.IncludePathList: - IncFile = PathClass(str(IncList[0]), Dir) - self.IncFileList.append(IncFile) - if os.path.isfile(IncFile.Path): - Lines.extend(self.PreProcess(IncFile, True)) - break - else: - EdkLogger.Error("Unicode File Parser", - ToolError.FILE_NOT_FOUND, - Message="Cannot find include file", - ExtraData=str(IncList[0])) - continue - # # Check if single line has correct '"' # -- 2.14.1.windows.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-13 6:35 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <cover.1520864219.git.jaben.carsey@intel.com> 2018-03-12 14:24 ` [PATCH v1 1/1] BaseTools: UPT: remove unused variable and inaccessible code Jaben Carsey 2018-03-13 6:42 ` Zhu, Yonghong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox