From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 326422034CF7F for ; Sun, 29 Oct 2017 22:22:59 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP; 29 Oct 2017 22:26:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,318,1505804400"; d="scan'208";a="1031028849" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 29 Oct 2017 22:26:48 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 29 Oct 2017 22:26:38 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 29 Oct 2017 22:26:37 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by shsmsx102.ccr.corp.intel.com ([169.254.2.175]) with mapi id 14.03.0319.002; Mon, 30 Oct 2017 13:26:35 +0800 From: "Gao, Liming" To: "Ni, Ruiyu" , "Alcantara, Paulo" , "Carsey, Jaben" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] ShellPkg: Fix type mismatch with GCC Thread-Index: AQHTT1IksQDT8KLr/0GoIV/kP4kX8KL3hDUAgARYbfD//32XgIAAhmOQ Date: Mon, 30 Oct 2017 05:26:35 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E17234D@SHSMSX104.ccr.corp.intel.com> References: , <4A89E2EF3DFEDB4C8BFDE51014F606A14E172312@SHSMSX104.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5BAABA94@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5BAABA94@SHSMSX104.ccr.corp.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] 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:22:59 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable That's good.=20 >-----Original Message----- >From: Ni, Ruiyu >Sent: Monday, October 30, 2017 1:25 PM >To: Gao, Liming ; Alcantara, Paulo ; >Carsey, Jaben ; edk2-devel@lists.01.org >Subject: RE: [PATCH] ShellPkg: Fix type mismatch with GCC > >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 Strin= Cmp in >UefiShellLevel2CommandsLib >294 Strnicmp() should use UNICODE_COLLATION.StrUpr() instead of >converting char to upper case inself > >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 >> >> 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. >> >> Another way is to propose adding StrniCmp() API into BaseLib. >> >> 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/UefiShellLevel2Commands >Li >> b >> >> .c | 1 + >> >> 1 file changed, 1 insertion(+) >> >> >> >> diff --git >> >> >> >a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Comman >d >> s >> >> Lib.c >> >> >> >b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Comman >d >> s >> >> Lib.c >> >> index 7948e53cfc..bab6631e15 100644 >> >> --- >> >> >> >a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Comman >d >> s >> >> Lib.c >> >> +++ >> >> >> >b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Comman >d >> 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