From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.8.53; helo=eur04-vi1-obe.outbound.protection.outlook.com; envelope-from=alexei.fedorov@arm.com; receiver=edk2-devel@lists.01.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80053.outbound.protection.outlook.com [40.107.8.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9A94F210C4DC9 for ; Mon, 30 Jul 2018 01:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7IQljmNlRmEOWltJzJI0Bj0SykMvr9M5KyKDpWjDyvs=; b=jrNelqwQaVkcln9E0XRQ2ht9yJSjw04NrnxzS6y63pZKzUhtTsOuR4KLX4mlKFFMW6V0fw+0iYGv2QBYpL4wSYLpjSC5ykLgrN0PVfQeZ3vnZyTyECzNSyjT0b9FLH/ElUj4yedpTpdYJxP8Z2P4nOENIySe0ZJT7ijeTZTtbVY= Received: from HE1PR08MB1162.eurprd08.prod.outlook.com (10.166.96.10) by HE1PR08MB2777.eurprd08.prod.outlook.com (10.170.243.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.17; Mon, 30 Jul 2018 08:27:52 +0000 Received: from HE1PR08MB1162.eurprd08.prod.outlook.com ([fe80::9128:79e3:5315:5b03]) by HE1PR08MB1162.eurprd08.prod.outlook.com ([fe80::9128:79e3:5315:5b03%7]) with mapi id 15.20.0995.020; Mon, 30 Jul 2018 08:27:52 +0000 From: Alexei Fedorov To: Dandan Bi , "edk2-devel@lists.01.org" CC: Ruiyu Ni , Jaben Carsey Thread-Topic: [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS build failure Thread-Index: AQHUJ6zjGlFyDxPH4EKWdkuxL7KbB6Snberu Date: Mon, 30 Jul 2018 08:27:51 +0000 Message-ID: References: <20180730022703.101708-1-dandan.bi@intel.com>, <20180730022703.101708-4-dandan.bi@intel.com> In-Reply-To: <20180730022703.101708-4-dandan.bi@intel.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexei.Fedorov@arm.com; x-originating-ip: [217.140.96.140] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR08MB2777; 6:Qtg+M/5hI30sWvAdMp7ZO3CHJU1sAE6eRHCMx5In1f68FjmmixHGqL9SwZXSnklxwqlMp/Ez9oNl67oolE2pUMh9EY8LKele24kHqrjBzQF2wUJoxG7Oz7mDZPmL7bhuO56L5b/xI5phAOnXnowzPbmuf/prncRUFAC1Uh1x/vDLnrhG6yq+5JeZnFNjr1mso8bzijIygNZ4mBQYHdbQWwi2U33b4aJjSnIn39Xu02Fu4ztZQOuLLRHlhaj2QgD1oawsi3oz2/bggWrH4CgzOT5erf75aOqBJ6R2stlhfJPZ9vXgDTwKvnyuX3UzH9qYJ0bDvXm//JBdEdqedlbdE7aKVgTLSnoA9xhR2EKIK4wDYnX9W3vyGullILFuWRIZFa1pRrjjeqpJnX5q6ZCX9SGlKLGcKHcOZZ7dvpmiPQg6IyuLEJa7DyL0mr1GZ2VYtD/4GgM+G1XBDxiTCP3sPg==; 5:kZg8hikyi4m2W8Q5bz4fZmT0rtpu48Zzbpv4GpPGL2zu1MvB8vnb8/7ZnYaQhtFaybxMKFXb9Mw6/s+4LZcr/DNG1IRpJjyH92WKfUlX/ZaAhAJsxq2EjZaTbwefFArQ2o12VRAf4cW4ZaeSbY2lkANFdhcemK9FPi+eWKDmp8M=; 7:yFG9q687s42qI0uT41CYxIHmumSomOhbHwWU2ZWazopHYy5g4XMuBRY1MlFWzd8CgUhNW0wALO234FL7v90USSp1N4n8GyAGOdZcjzgqrwegXhZkwrUC27wHDXtf0wbXKBmEebM3mLk2yEsUMZTfzNs5tIjDm3ndHIAASUod8E+U3TtXnWCQDdRcIokkEYUmZc4839+efcFVoPSqc/PTG9qVPp81kVKEKB/Hg9tHCFONfMCV4nmYNO4sPAtPNITo x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: b7f83773-9c09-4aee-a337-08d5f5f65785 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:HE1PR08MB2777; x-ms-traffictypediagnostic: HE1PR08MB2777: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(223705240517415)(162533806227266)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:HE1PR08MB2777; BCL:0; PCL:0; RULEID:; SRVR:HE1PR08MB2777; x-forefront-prvs: 0749DC2CE6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(136003)(39850400004)(396003)(40434004)(189003)(199004)(2501003)(5250100002)(5660300001)(6246003)(105586002)(74316002)(2906002)(8676002)(66066001)(4326008)(316002)(25786009)(19627405001)(53936002)(6436002)(97736004)(54896002)(55016002)(6306002)(9686003)(229853002)(236005)(6116002)(33656002)(54906003)(110136005)(7696005)(26005)(606006)(76176011)(21615005)(68736007)(6606003)(446003)(11346002)(256004)(14444005)(5024004)(6506007)(53546011)(102836004)(8936002)(81166006)(72206003)(476003)(186003)(81156014)(3846002)(86362001)(478600001)(2900100001)(14454004)(7736002)(966005)(99286004)(106356001)(486006)(21314002)(213903007); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR08MB2777; H:HE1PR08MB1162.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: MnTbEsHrVAMPp8MgEUM3BgdrnP8idH6Z9M5LbAZP2DC2YEBFy6M+VcjEuHRqmQelB8K/NwFuTdnlOrvdZ96TPkQCDtsAav11iqQ1+BjJGn1SyxwZT0tIcSQoOxXfmgv90CPeL5BCtY1KSfzl1bUwduO6TZ1cesx2Tjpzrd+ACVtz0gkeQq6rHsKV8GNfy8joMOjcaH7g9jiYpg4fxPOEslHM8DU+LzteBzSfcZ51Arw8F/htJ6AjAQkD1sEvtvuQBqb2qK5vmcc3HtLQig46MfIJwc0tNK9ArAgyWfZFgwK8n+RZHm0OCR3EDE6fcys2kVT8Tsg/vj+STd1Wf7p8hCAUUHJszo+DKp3L14cQzEA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: b7f83773-9c09-4aee-a337-08d5f5f65785 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jul 2018 08:27:51.9917 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB2777 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:27:57 -0000 Content-Language: en-GB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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.