From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.96.140; helo=cam-smtp0.cambridge.arm.com; envelope-from=alexei.fedorov@arm.com; receiver=edk2-devel@lists.01.org Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B9475209688E3 for ; Fri, 13 Jul 2018 08:17:11 -0700 (PDT) Received: from E107992.Emea.Arm.com (e107992.emea.arm.com [10.1.211.7]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id w6DFH1v0018167; Fri, 13 Jul 2018 16:17:01 +0100 From: AlexeiFedorov To: edk2-devel@lists.01.org Cc: Ard.Biesheuvel@linaro.org, Leif.Lindholm@linaro.org, Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com, nd@arm.com, Jaben.Carsey@intel.com, Ruiyu.Ni@intel.com, Evan.Lloyd@arm.com, Sami.Mujawar@arm.com Date: Fri, 13 Jul 2018 16:17:01 +0100 Message-Id: <20180713151701.20168-1-Alexei.Fedorov@arm.com> X-Mailer: git-send-email 2.18.0.windows.1 Subject: [PATCH v1] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2017 compilation errors 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: Fri, 13 Jul 2018 15:17:12 -0000 This patch fixes VS2017 compilation errors for UefiShellAcpiViewCommandLib\Parsers\Gtdt\GtdtParser.c and UefiShellAcpiViewCommandLib\Parsers\Xsdt\XsdtParser.c reported in https://bugzilla.tianocore.org/show_bug.cgi?id=985 https://bugzilla.tianocore.org/show_bug.cgi?id=986 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Alexei Fedorov --- All the changes can be reviewed at https://github.com/AlexeiFedorov/edk2/tree/298_acpiview_fix_v1 Notes: v1: - GtdtParser.c DumpFTBlock() function: change UINT16 type of Length parameter to UINT32 change UINT16 type of GTBlockTimerLength variable to UINT32 - XsdtParser.c ParseAcpiXsdt() function: change name of local variable from Ptr to SignaturePtr ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c | 4 ++-- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c index 3a3cee948ad8cd35ef3a6e13fec9d44300dbe73f..0ab460b02c9e062ac181e42e7e77f875a40c86dc 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c @@ -161,12 +161,12 @@ STATIC VOID DumpGTBlock ( IN UINT8* Ptr, - IN UINT16 Length + IN UINT32 Length ) { UINT32 Index; UINT32 Offset; - UINT16 GTBlockTimerLength; + UINT32 GTBlockTimerLength; Offset = ParseAcpi ( TRUE, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c index 99521cd67a714065c2eb9e4e5ec0f2e21f4c9da9..a5e1412484b56258c40e0cb4d795157ffbce6826 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c @@ -96,7 +96,7 @@ ParseAcpiXsdt ( CONST UINT8* Revision; if ((UINT64*)(UINTN)(*TablePointer) != NULL) { - UINT8* Ptr; + UINT8* SignaturePtr; ParseAcpiHeader ( (UINT8*)(UINTN)(*TablePointer), @@ -105,17 +105,17 @@ ParseAcpiXsdt ( &Revision ); - Ptr = (UINT8*)Signature; + SignaturePtr = (UINT8*)Signature; UnicodeSPrint ( Buffer, sizeof (Buffer), L"Entry[%d] - %c%c%c%c", EntryIndex++, - Ptr[0], - Ptr[1], - Ptr[2], - Ptr[3] + SignaturePtr[0], + SignaturePtr[1], + SignaturePtr[2], + SignaturePtr[3] ); } else { UnicodeSPrint ( -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'