From: "Bi, Dandan" <dandan.bi@intel.com>
To: Alexei Fedorov <Alexei.Fedorov@arm.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
"Carsey, Jaben" <jaben.carsey@intel.com>
Subject: Re: [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS build failure
Date: Mon, 30 Jul 2018 08:49:56 +0000 [thread overview]
Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3BB4F3CF@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <HE1PR08MB1162722FE8C2D83B888F55EE9A2F0@HE1PR08MB1162.eurprd08.prod.outlook.com>
Hi Alexei,
I didn't notice your patch before. So I create this patch along with others 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 <dandan.bi@intel.com>; edk2-devel@lists.01.org
Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Carsey, Jaben <jaben.carsey@intel.com>
Subject: Re: [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS build failure
Dandan,
What is the reason for providing this patch addressing the same issues which 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 <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>
Sent: 30 July 2018 03:27:02
To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Alexei Fedorov; Ruiyu Ni; Jaben Carsey
Subject: [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS build failure
Fix following warnings:
1.
xxx\GtdtParser.c(179): warning C4244:
'=': conversion from 'UINT32' to 'UINT16', possible loss of data
xxx\GtdtParser.c(180): warning C4244:
'-=': conversion from 'UINT32' to 'UINT16', possible loss of data
xxx\GtdtParser.c(196): warning C4244:
'-=': 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 <Alexei.Fedorov@arm.com<mailto:Alexei.Fedorov@arm.com>>
cc: Ruiyu Ni <ruiyu.ni@intel.com<mailto:ruiyu.ni@intel.com>>
cc: Jaben Carsey <jaben.carsey@intel.com<mailto:jaben.carsey@intel.com>>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>
---
.../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/GtdtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.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 = (*GtBlockLength - Offset) / (*GtBlockTimerCount);
- Length -= Offset;
+ GTBlockTimerLength = (*GtBlockLength - (UINT16)Offset) / (UINT16)(*GtBlockTimerCount);
+ Length -= (UINT16)Offset;
if (*GtBlockTimerCount != 0) {
Ptr += (*GtBlockTimerOffset);
Index = 0;
while ((Index < (*GtBlockTimerCount)) && (Length >= GTBlockTimerLength)) {
@@ -191,11 +191,11 @@ DumpGTBlock (
GTBlockTimerLength,
PARSER_PARAMS (GtBlockTimerParser)
);
// Increment by GT Block Timer structure size
Ptr += Offset;
- Length -= Offset;
+ Length -= (UINT16)Offset;
Index++;
}
if (Length != 0) {
IncrementErrorCount ();
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.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) != NULL) {
- UINT8* Ptr;
ParseAcpiHeader (
(UINT8*)(UINTN)(*TablePointer),
&Signature,
&Length,
&Revision
);
- Ptr = (UINT8*)Signature;
+ Pointer = (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 confidential and may also be privileged. If you are not the intended recipient, please 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.
next prev parent reply other threads:[~2018-07-30 8:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-30 2:26 [patch 0/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix build issues Dandan Bi
2018-07-30 2:27 ` [patch 1/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 build failure Dandan Bi
2018-07-30 17:46 ` Carsey, Jaben
2018-07-30 2:27 ` [patch 2/4] " Dandan Bi
2018-07-30 17:46 ` Carsey, Jaben
2018-07-30 2:27 ` [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS " Dandan Bi
2018-07-30 8:27 ` Alexei Fedorov
2018-07-30 8:49 ` Bi, Dandan [this message]
2018-07-30 2:27 ` [patch 4/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix GCC " Dandan Bi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C0D5C461C9E904E8F62152F6274C0BB3BB4F3CF@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox