From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 2291721E082B3 for ; Mon, 12 Mar 2018 23:35:43 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2018 23:42:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,464,1515484800"; d="scan'208";a="25165922" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 12 Mar 2018 23:42:04 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 12 Mar 2018 23:42:04 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 12 Mar 2018 23:42:04 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.235]) by shsmsx102.ccr.corp.intel.com ([169.254.2.80]) with mapi id 14.03.0319.002; Tue, 13 Mar 2018 14:42:00 +0800 From: "Zhu, Yonghong" To: "Carsey, Jaben" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Chen, Hesheng" , "Zhu, Yonghong" Thread-Topic: [PATCH v1 1/1] BaseTools: UPT: remove unused variable and inaccessible code. Thread-Index: AQHTug3qcbgQvYdf4ECQ8pmfXoR13qPNuIcA Date: Tue, 13 Mar 2018 06:42:00 +0000 Message-ID: References: <3ae564bf2ec7946e365383409878d81fa690f67d.1520864219.git.jaben.carsey@intel.com> In-Reply-To: <3ae564bf2ec7946e365383409878d81fa690f67d.1520864219.git.jaben.carsey@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v1 1/1] BaseTools: UPT: remove unused variable and inaccessible code. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 06:35:44 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -----Original Message----- From: Carsey, Jaben=20 Sent: Monday, March 12, 2018 10:25 PM To: edk2-devel@lists.01.org Cc: Zhu, Yonghong ; Gao, Liming Subject: [PATCH v1 1/1] BaseTools: UPT: remove unused variable and inaccess= ible code. gINCLUDE_PATTERN is never used. IncList is always empty. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/UPT/Library/UniClassObject.py | 18 ---------------= --- 1 file changed, 18 deletions(-) diff --git a/BaseTools/Source/Python/UPT/Library/UniClassObject.py b/BaseTo= ols/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 =3D u'\u0000' TAB =3D u'\t' BACK_SPLASH =3D u'\\' =20 -gINCLUDE_PATTERN =3D re.compile("^!include[\s]+([\S]+)[\s]*$", re.MULTILIN= E | re.UNICODE) - gLANG_CONV_TABLE =3D {'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 =3D Line.replace(u'\t', u' ') Line =3D Line.replace(u'\u0006', u'\\') =20 - # IncList =3D gINCLUDE_PATTERN.findall(Line) - IncList =3D [] - if len(IncList) =3D=3D 1: - for Dir in [File.Dir] + self.IncludePathList: - IncFile =3D 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",=20 - ToolError.FILE_NOT_FOUND,=20 - Message=3D"Cannot find include file",= =20 - ExtraData=3Dstr(IncList[0])) - continue - # # Check if single line has correct '"' # -- 2.14.1.windows.1