From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Neutral (access neither permitted nor denied) identity=mailfrom; client-ip=104.47.36.132; helo=nam02-sn1-obe.outbound.protection.outlook.com; envelope-from=paulo@hp.com; receiver=edk2-devel@lists.01.org Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0132.outbound.protection.outlook.com [104.47.36.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 45BCB20352605 for ; Mon, 30 Oct 2017 05:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=HP.onmicrosoft.com; s=selector1-hp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BJEcz01WvKi7N/FBloLYwC7yR4uAK7tVL2DtXmDj/Ns=; b=Dg079BeCMQ7/mnuQmdT8irckVLHUAOen3dHQkadfZc+OSsvilU+ZeAOsG3fjaNIg+k9c2UFMC7O2MdgG8Oke3oQTl5Icqir3ZDzlwxzw0DsmMIWQWIdEz0UMo2ud/z/uNPD16ZRUUP936ASW8xtBtNteInUJCthhp8qTS1kBXU4= Received: from AT5PR8401MB0706.NAMPRD84.PROD.OUTLOOK.COM (10.169.5.19) by AT5PR8401MB0708.NAMPRD84.PROD.OUTLOOK.COM (10.169.5.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Mon, 30 Oct 2017 12:44:30 +0000 Received: from AT5PR8401MB0706.NAMPRD84.PROD.OUTLOOK.COM ([fe80::8187:37eb:9fa3:2092]) by AT5PR8401MB0706.NAMPRD84.PROD.OUTLOOK.COM ([fe80::8187:37eb:9fa3:2092%18]) with mapi id 15.20.0178.007; Mon, 30 Oct 2017 12:44:30 +0000 From: "Alcantara, Paulo" To: "Gao, Liming" , "Ni, Ruiyu" , "Carsey, Jaben" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] ShellPkg: Fix type mismatch with GCC Thread-Index: AQHTT0Ai4yw6kLAQ60Kzk0atpazDV6L4Ba2AgAAAnCyAA9gkgIAAAg2AgAAAU4CAAHkZMA== Date: Mon, 30 Oct 2017 12:44:30 +0000 Message-ID: References: , <4A89E2EF3DFEDB4C8BFDE51014F606A14E172312@SHSMSX104.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5BAABA94@SHSMSX104.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E17234D@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E17234D@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [15.65.254.15] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AT5PR8401MB0708; 6:CLUffrvkJVq1MTv/ZWlSy8WvY9PlI5cDPr6fzY33h5nvWxHrLvWCuF8Ck/PymyiT7Awe7Ds69S1PcI48x4vum0gg1dkqwov7zs1iq+RVxDt2QjXRNUoFcjvRa5/2FvmOnUiWUUjs2JFA4kX7P7fCS4e0/9AK47K8zG+mxue/pxQIbr1kbC4vwoNo0SI9hV5wD58v2ymMeVI1JZNtdZ6bB3aShofjMMZcdWyCF2wqSVlOnEEiA7jrK2eQAgh5tJ3Ndty68tWGHzO18fZ0DcdJ2GsvuxAoy1dQeWJ0eA1zXVf0TmL4Vs4ChYbokMBxRGBIemU4E/yy4h8z7j5z6Kpx/nfXtDLzwkIatG3ZP5L7yFY=; 5:jqL/fMgf2VwviYAekrB1uZwRJHnXqU2K+QC1V7Jdg7XfJtdau92odi0BxpKQvG5axiwtvx4sSLSvjT+aIG8DBtLn0PQ2W7YIAqScTGTZ8YuKbvxh6q/A0C4EKfBtpw1UeBA+FJbJ87AwqQ/VErEmb/5MpL5/AF+gMif7m59NA3Q=; 24:fmnF6gUDOw+TKMEyBBF8ijUX4JrrPv4g10/bdsse37vbe47tXHVVj380RznYEnlpksMbb5r017LYuphF8E1cfAxSRuaOogp5hQGlL2HEGEQ=; 7:TQutt9TtYHMkj1COqCd/CHPo08kJlReNCyRROfbh+Ojg0rkU9XZcqCOCR3hUksqI8S7s9qJiKy+3U8C4wD7u7lSSPz4AY7Qn3QZaa+YZIGMb2dCKH95tlQfmTm7IbIW/84DL5pVzxVpWREMHIsbSKuvRss0YVvJD8nc46CGDoTOlFrrnJjmK+5/XKKI7z03KU+7mVNKzrxPH4nkIveKl722c4qjJyBiIBjYspmD6KqDh3qzONEyljl1fQNTqJqB6 x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 6fe47236-4870-4777-a5aa-08d51f93f71d x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(2017052603238); SRVR:AT5PR8401MB0708; x-ms-traffictypediagnostic: AT5PR8401MB0708: x-exchange-antispam-report-test: UriScan:(788757137089)(162533806227266)(228905959029699)(73583498263828); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(3231020)(93006095)(93001095)(3002001)(6041248)(20161123558100)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AT5PR8401MB0708; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AT5PR8401MB0708; x-forefront-prvs: 0476D4AB88 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(376002)(346002)(199003)(189002)(6602003)(13464003)(8936002)(7736002)(3280700002)(6116002)(6306002)(6246003)(316002)(55016002)(8676002)(81166006)(81156014)(53546010)(33656002)(3846002)(5250100002)(93886005)(102836003)(2900100001)(53936002)(97736004)(9686003)(2950100002)(110136005)(2501003)(6506006)(50986999)(86362001)(105586002)(106356001)(66066001)(6436002)(2906002)(54356999)(5660300001)(229853002)(7696004)(76176999)(189998001)(305945005)(478600001)(74316002)(101416001)(3660700001)(25786009)(68736007)(14454004)(19627235001); DIR:OUT; SFP:1102; SCL:1; SRVR:AT5PR8401MB0708; H:AT5PR8401MB0706.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: hp.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=paulo@hp.com; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6fe47236-4870-4777-a5aa-08d51f93f71d X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Oct 2017 12:44:30.7487 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ca7981a2-785a-463d-b82a-3db87dfc3ce6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR8401MB0708 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 12:40:42 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ruiyu, Thanks for letting me know. I agree with below changes and they look good t= o me. Please go ahead and fix them. Hopefully I'll get a chance to review/= test it. Paulo -----Original Message----- From: Gao, Liming [mailto:liming.gao@intel.com]=20 Sent: Monday, October 30, 2017 3:27 AM To: Ni, Ruiyu ; Alcantara, Paulo ; Carsey= , Jaben ; edk2-devel@lists.01.org Subject: RE: [PATCH] ShellPkg: Fix type mismatch with GCC That's good.=20 >-----Original Message----- >From: Ni, Ruiyu >Sent: Monday, October 30, 2017 1:25 PM >To: Gao, Liming ; Alcantara, Paulo=20 >; Carsey, Jaben ;=20 >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=20 >> ; 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=20 >> 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=20 >> >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=20 >> >BaseLib and unexported. >> > >> >The comment above the declaration in UefiShellLevel2CommandsLib.c=20 >> >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=20 >> >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=20 >> >> ; 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/UefiShellLevel2CommandsLi >> >b >/ >> U >> >> efiShellLevel2CommandsLib.c:271:1: >> >> warning: type of 'InternalCharToUpper' does not match original=20 >> >> decl aration [-Wlto-type-mismatch] InternalCharToUpper ( ^ >> >> /home/pcacjr/src/edk2.git/MdePkg/Library/BaseLib/String.c:555:1: note= : >> >> 'InternalCharToUpper' was previously declared here=20 >> >> 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