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.136; helo=mga12.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 D008A210C5153 for ; Mon, 30 Jul 2018 01:50:01 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jul 2018 01:50:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,422,1526367600"; d="scan'208,217";a="77115187" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 30 Jul 2018 01:50:00 -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, 30 Jul 2018 01:50:00 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 30 Jul 2018 01:50:00 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.57]) with mapi id 14.03.0319.002; Mon, 30 Jul 2018 16:49:57 +0800 From: "Bi, Dandan" To: Alexei Fedorov , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" , "Carsey, Jaben" Thread-Topic: [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS build failure Thread-Index: AQHUJ985SN8Gn9Nqe0SyXucw4zqItKSnb+Vw Date: Mon, 30 Jul 2018 08:49:56 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3BB4F3CF@shsmsx102.ccr.corp.intel.com> References: <20180730022703.101708-1-dandan.bi@intel.com>, <20180730022703.101708-4-dandan.bi@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.27 Subject: Re: [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS build failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 08:50:02 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Alexei, I didn't notice your patch before. So I create this patch along with other= s to fix all the build issues. And your patch which fix the build error seems not commit to edk2 code base= . When do you plan to commit it? Hi all, Please review other patches in this series and ignore this one. Sorry for any inconvenience. Thanks, Dandan From: Alexei Fedorov [mailto:Alexei.Fedorov@arm.com] Sent: Monday, July 30, 2018 4:28 PM To: Bi, Dandan ; edk2-devel@lists.01.org Cc: Ni, Ruiyu ; Carsey, Jaben Subject: Re: [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS build= failure Dandan, What is the reason for providing this patch addressing the same issues whic= h were fixed by already reviewed patch sent on 13 July? See thread for https://lists.01.org/pipermail/edk2-devel/2018-July/027139.html Alexei ________________________________ From: Dandan Bi > Sent: 30 July 2018 03:27:02 To: edk2-devel@lists.01.org Cc: Alexei Fedorov; Ruiyu Ni; Jaben Carsey Subject: [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS build fai= lure Fix following warnings: 1. xxx\GtdtParser.c(179): warning C4244: '=3D': conversion from 'UINT32' to 'UINT16', possible loss of data xxx\GtdtParser.c(180): warning C4244: '-=3D': conversion from 'UINT32' to 'UINT16', possible loss of data xxx\GtdtParser.c(196): warning C4244: '-=3D': conversion from 'UINT32' to 'UINT16', possible loss of data 2. xxx\XsdtParser.c(99): warning C4457: declaration of 'Ptr' hides function parameter cc: Alexei Fedorov > cc: Ruiyu Ni > cc: Jaben Carsey > Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi > --- .../UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c | 6 +++--- .../UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c | 12 ++++++--= ---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/Gtdt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtPa= rser.c index 3a3cee948a..d5671081da 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.= c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.= c @@ -174,12 +174,12 @@ DumpGTBlock ( "GT Block", Ptr, Length, PARSER_PARAMS (GtBlockParser) ); - GTBlockTimerLength =3D (*GtBlockLength - Offset) / (*GtBlockTimerCount); - Length -=3D Offset; + GTBlockTimerLength =3D (*GtBlockLength - (UINT16)Offset) / (UINT16)(*GtB= lockTimerCount); + Length -=3D (UINT16)Offset; if (*GtBlockTimerCount !=3D 0) { Ptr +=3D (*GtBlockTimerOffset); Index =3D 0; while ((Index < (*GtBlockTimerCount)) && (Length >=3D GTBlockTimerLeng= th)) { @@ -191,11 +191,11 @@ DumpGTBlock ( GTBlockTimerLength, PARSER_PARAMS (GtBlockTimerParser) ); // Increment by GT Block Timer structure size Ptr +=3D Offset; - Length -=3D Offset; + Length -=3D (UINT16)Offset; Index++; } if (Length !=3D 0) { IncrementErrorCount (); diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/Xsdt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtPa= rser.c index 99521cd67a..341a61b8fb 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.= c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.= c @@ -63,10 +63,11 @@ ParseAcpiXsdt ( UINT32 Offset; UINT32 TableOffset; UINT64* TablePointer; UINTN EntryIndex; CHAR16 Buffer[32]; + UINT8* Pointer; // Parse the ACPI header to get the length ParseAcpi ( FALSE, 0, @@ -94,30 +95,29 @@ ParseAcpiXsdt ( CONST UINT32* Signature; CONST UINT32* Length; CONST UINT8* Revision; if ((UINT64*)(UINTN)(*TablePointer) !=3D NULL) { - UINT8* Ptr; ParseAcpiHeader ( (UINT8*)(UINTN)(*TablePointer), &Signature, &Length, &Revision ); - Ptr =3D (UINT8*)Signature; + Pointer =3D (UINT8*)Signature; UnicodeSPrint ( Buffer, sizeof (Buffer), L"Entry[%d] - %c%c%c%c", EntryIndex++, - Ptr[0], - Ptr[1], - Ptr[2], - Ptr[3] + Pointer[0], + Pointer[1], + Pointer[2], + Pointer[3] ); } else { UnicodeSPrint ( Buffer, sizeof (Buffer), -- 2.14.3.windows.1 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.