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=ruiyu.ni@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 ACD492034CF7F for ; Sun, 29 Oct 2017 22:21:41 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 29 Oct 2017 22:25:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,318,1505804400"; d="scan'208";a="1031028511" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 29 Oct 2017 22:25:29 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 29 Oct 2017 22:25:29 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 29 Oct 2017 22:25:29 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Mon, 30 Oct 2017 13:25:26 +0800 From: "Ni, Ruiyu" To: "Gao, Liming" , "Alcantara, Paulo" , "Carsey, Jaben" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] ShellPkg: Fix type mismatch with GCC Thread-Index: AQHTT0AXgECRsTudIEOqR+R5t6O2W6L3f5CAgAAEyQCAA9P4gIAAh2eQ Date: Mon, 30 Oct 2017 05:25:25 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BAABA94@SHSMSX104.ccr.corp.intel.com> References: , <4A89E2EF3DFEDB4C8BFDE51014F606A14E172312@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E172312@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] ShellPkg: Fix type mismatch with GCC X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2017 05:21:41 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have a pending task to remove the dependency of InternalCharToUpper(). Below two bugs require the same fix. 664 [Shell] UnicodeCollation->StriColl() should be used to replace StrinC= mp in UefiShellLevel2CommandsLib =20 294 Strnicmp() should use UNICODE_COLLATION.StrUpr() instead of convertin= g char to upper case inself =20 I think fixing them two is the right solution to go. Thanks/Ray > -----Original Message----- > From: Gao, Liming > Sent: Monday, October 30, 2017 1:18 PM > To: Alcantara, Paulo ; Carsey, Jaben > ; edk2-devel@lists.01.org > Cc: Ni, Ruiyu > Subject: RE: [PATCH] ShellPkg: Fix type mismatch with GCC >=20 > I suggest to rename it and add its implementation in ShellPkg. We don't > expect to use the internal function from another library or driver. >=20 > Another way is to propose adding StrniCmp() API into BaseLib. >=20 > Thanks > Liming > >-----Original Message----- > >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > >Alcantara, Paulo > >Sent: Saturday, October 28, 2017 2:51 AM > >To: Carsey, Jaben ; edk2-devel@lists.01.org > >Cc: Ni, Ruiyu > >Subject: Re: [edk2] [PATCH] ShellPkg: Fix type mismatch with GCC > > > >Hi Jaben, > > > >No, we can't. InternalCharToUpper() is declared internally in BaseLib > >and unexported. > > > >The comment above the declaration in UefiShellLevel2CommandsLib.c > >explains it: > > > >/** > > Be lazy and borrow from baselib. > > > > @param[in] Char The character to convert to upper case. > > > > @return Char as an upper case character. > >**/ > > > >Thanks, > >Paulo > > > >________________________________________ > >From: Carsey, Jaben > >Sent: Friday, October 27, 2017 4:33 PM > >To: Alcantara, Paulo; edk2-devel@lists.01.org > >Cc: Ni, Ruiyu > >Subject: RE: [PATCH] ShellPkg: Fix type mismatch with GCC > > > >Are we redefining a function from BaseLib? Why not remove the > >redundant definition instead of making it match? > > > >-Jaben > > > >> -----Original Message----- > >> From: Paulo Alcantara [mailto:paulo@hp.com] > >> Sent: Friday, October 27, 2017 9:24 AM > >> To: edk2-devel@lists.01.org > >> Cc: Paulo Alcantara ; Carsey, Jaben > >> ; Ni, Ruiyu > >> Subject: [PATCH] ShellPkg: Fix type mismatch with GCC > >> Importance: High > >> > >> This patch fixes the following warning reported by GCC 6.3: > >> > >> > >/home/pcacjr/src/edk2.git/ShellPkg/Library/UefiShellLevel2CommandsLib/ > U > >> efiShellLevel2CommandsLib.c:271:1: > >> warning: type of 'InternalCharToUpper' does not match original decl > >> aration [-Wlto-type-mismatch] InternalCharToUpper ( ^ > >> /home/pcacjr/src/edk2.git/MdePkg/Library/BaseLib/String.c:555:1: note: > >> 'InternalCharToUpper' was previously declared here > >> InternalCharToUpper ( ^ > >> > >> Cc: Jaben Carsey > >> Cc: Ruiyu Ni > >> Contributed-under: TianoCore Contribution Agreement 1.1 > >> Signed-off-by: Paulo Alcantara > >> --- > >> > >> > >ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLi > b > >> .c | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git > >> > >a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Command > s > >> Lib.c > >> > >b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Command > s > >> Lib.c > >> index 7948e53cfc..bab6631e15 100644 > >> --- > >> > >a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Command > s > >> Lib.c > >> +++ > >> > >b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Command > s > >> Lib.c > >> @@ -268,6 +268,7 @@ VerifyIntermediateDirectories ( > >> @return Char as an upper case character. > >> **/ > >> CHAR16 > >> +EFIAPI > >> InternalCharToUpper ( > >> IN CONST CHAR16 Char > >> ); > >> -- > >> 2.11.0 > > > >_______________________________________________ > >edk2-devel mailing list > >edk2-devel@lists.01.org > >https://lists.01.org/mailman/listinfo/edk2-devel