* [patch 0/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix build issues @ 2018-07-30 2:26 Dandan Bi 2018-07-30 2:27 ` [patch 1/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 build failure Dandan Bi ` (3 more replies) 0 siblings, 4 replies; 9+ messages in thread From: Dandan Bi @ 2018-07-30 2:26 UTC (permalink / raw) To: edk2-devel; +Cc: Alexei Fedorov, Ruiyu Ni, Jaben Carsey Fix VS and GCC build failure issues cc: Alexei Fedorov <Alexei.Fedorov@arm.com> cc: Ruiyu Ni <ruiyu.ni@intel.com> cc: Jaben Carsey <jaben.carsey@intel.com> Dandan Bi (4): ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 build failure ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 build failure ShellPkg/UefiShellAcpiViewCommandLib: Fix VS build failure ShellPkg/UefiShellAcpiViewCommandLib: Fix GCC build failure ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 4 ++-- .../UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c | 2 +- .../UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c | 6 +++--- .../UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c | 6 +++--- .../UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c | 4 ++-- .../UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c | 2 ++ .../UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c | 12 ++++++------ .../UefiShellAcpiViewCommandLib.c | 1 + 8 files changed, 20 insertions(+), 17 deletions(-) -- 2.14.3.windows.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 1/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 build failure 2018-07-30 2:26 [patch 0/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix build issues Dandan Bi @ 2018-07-30 2:27 ` Dandan Bi 2018-07-30 17:46 ` Carsey, Jaben 2018-07-30 2:27 ` [patch 2/4] " Dandan Bi ` (2 subsequent siblings) 3 siblings, 1 reply; 9+ messages in thread From: Dandan Bi @ 2018-07-30 2:27 UTC (permalink / raw) To: edk2-devel; +Cc: Alexei Fedorov, Ruiyu Ni, Jaben Carsey Fix following build error: xxx\AcpiParser.c(487) : error C2275: 'UINTN' : illegal use of this type as an expression xxx\ProcessorBind.h(224) : see declaration of 'UINTN' xxx\AcpiParser.c(487) : error C2146: syntax error : missing ';' before identifier 'OriginalAttribute' xxx\AcpiParser.c(487) : error C2065: 'OriginalAttribute' : undeclared identifier ...... cc: Alexei Fedorov <Alexei.Fedorov@arm.com> cc: Ruiyu Ni <ruiyu.ni@intel.com> cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> --- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index 6d3bc451ac..630c41b71d 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c @@ -474,19 +474,19 @@ ParseAcpi ( ) { UINT32 Index; UINT32 Offset; BOOLEAN HighLight; + UINTN OriginalAttribute; Offset = 0; // Increment the Indent gIndent += Indent; if (Trace && (AsciiName != NULL)){ HighLight = GetColourHighlighting (); - UINTN OriginalAttribute; if (HighLight) { OriginalAttribute = gST->ConOut->Mode->Attribute; gST->ConOut->SetAttribute ( gST->ConOut, -- 2.14.3.windows.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [patch 1/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 build failure 2018-07-30 2:27 ` [patch 1/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 build failure Dandan Bi @ 2018-07-30 17:46 ` Carsey, Jaben 0 siblings, 0 replies; 9+ messages in thread From: Carsey, Jaben @ 2018-07-30 17:46 UTC (permalink / raw) To: Bi, Dandan, edk2-devel@lists.01.org; +Cc: Alexei Fedorov, Ni, Ruiyu Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> > -----Original Message----- > From: Bi, Dandan > Sent: Sunday, July 29, 2018 7:27 PM > To: edk2-devel@lists.01.org > Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>; Ni, Ruiyu > <ruiyu.ni@intel.com>; Carsey, Jaben <jaben.carsey@intel.com> > Subject: [patch 1/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 > build failure > Importance: High > > Fix following build error: > xxx\AcpiParser.c(487) : error C2275: 'UINTN' : > illegal use of this type as an expression > xxx\ProcessorBind.h(224) : see declaration of 'UINTN' > xxx\AcpiParser.c(487) : error C2146: syntax error : > missing ';' before identifier 'OriginalAttribute' > xxx\AcpiParser.c(487) : error C2065: 'OriginalAttribute' : > undeclared identifier > ...... > > cc: Alexei Fedorov <Alexei.Fedorov@arm.com> > cc: Ruiyu Ni <ruiyu.ni@intel.com> > cc: Jaben Carsey <jaben.carsey@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Dandan Bi <dandan.bi@intel.com> > --- > ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > index 6d3bc451ac..630c41b71d 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > @@ -474,19 +474,19 @@ ParseAcpi ( > ) > { > UINT32 Index; > UINT32 Offset; > BOOLEAN HighLight; > + UINTN OriginalAttribute; > > Offset = 0; > > // Increment the Indent > gIndent += Indent; > > if (Trace && (AsciiName != NULL)){ > HighLight = GetColourHighlighting (); > - UINTN OriginalAttribute; > > if (HighLight) { > OriginalAttribute = gST->ConOut->Mode->Attribute; > gST->ConOut->SetAttribute ( > gST->ConOut, > -- > 2.14.3.windows.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 2/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 build failure 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 2:27 ` 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 2:27 ` [patch 4/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix GCC " Dandan Bi 3 siblings, 1 reply; 9+ messages in thread From: Dandan Bi @ 2018-07-30 2:27 UTC (permalink / raw) To: edk2-devel; +Cc: Alexei Fedorov, Ruiyu Ni, Jaben Carsey Fix following build error: UefiShellAcpiViewCommandLib\AcpiParser.c(519) : error C2308: concatenating mismatched strings Concatenating wide "ERROR: %a: Offset Mismatch for %s" with narrow "CurrentOffset = %d FieldOffset = %d" cc: Alexei Fedorov <Alexei.Fedorov@arm.com> cc: Ruiyu Ni <ruiyu.ni@intel.com> cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> --- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 2 +- .../Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c | 2 +- .../Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c | 6 +++--- .../Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index 630c41b71d..18c4983e95 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c @@ -514,11 +514,11 @@ ParseAcpi ( if (Offset != Parser[Index].Offset) { IncrementErrorCount (); Print ( L"\nERROR: %a: Offset Mismatch for %s\n" - "CurrentOffset = %d FieldOffset = %d\n", + L"CurrentOffset = %d FieldOffset = %d\n", AsciiName, Parser[Index].NameStr, Offset, Parser[Index].Offset ); diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c index bc8b7b00e3..e6185d2755 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c @@ -118,11 +118,11 @@ ValidateNameSpaceStrLen ( if (NameSpaceStrLen < 2) { IncrementErrorCount (); Print ( L"\nERROR: NamespaceString Length = %d. If no Namespace device exists,\n" - " then NamespaceString[] must contain a period '.'", + L" then NamespaceString[] must contain a period '.'", NameSpaceStrLen ); } } diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c index a704b0c631..999ac698ec 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c @@ -229,11 +229,11 @@ ParseAcpiMadt ( if (((Offset + (*MadtInterruptControllerLength)) > AcpiTableLength) || (*MadtInterruptControllerLength < 4)) { IncrementErrorCount (); Print ( L"ERROR: Invalid Interrupt Controller Length," - " Type = %d, Length = %d\n", + L" Type = %d, Length = %d\n", *MadtInterruptControllerType, *MadtInterruptControllerLength ); break; } @@ -254,11 +254,11 @@ ParseAcpiMadt ( case EFI_ACPI_6_2_GICD: { if (++GICDCount > 1) { IncrementErrorCount (); Print ( L"ERROR: Only one GICD must be present," - " GICDCount = %d\n", + L" GICDCount = %d\n", GICDCount ); } ParseAcpi ( TRUE, @@ -309,11 +309,11 @@ ParseAcpiMadt ( default: { IncrementErrorCount (); Print ( L"ERROR: Unknown Interrupt Controller Structure," - " Type = %d, Length = %d\n", + L" Type = %d, Length = %d\n", *MadtInterruptControllerType, *MadtInterruptControllerLength ); } } // switch diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c index c38666d2b7..6496a3d624 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c @@ -117,11 +117,11 @@ ParseAcpiSlit ( // Element[x][x] must be equal to 10 if ((Count == Index) && (SLIT_ELEMENT (LocalityPtr, Count,Index) != 10)) { IncrementErrorCount (); Print ( L"ERROR: Diagonal Element[0x%lx][0x%lx] (%3d)." - " Normalized Value is not 10\n", + L" Normalized Value is not 10\n", Count, Index, SLIT_ELEMENT (LocalityPtr, Count, Index) ); } @@ -129,11 +129,11 @@ ParseAcpiSlit ( if (SLIT_ELEMENT (LocalityPtr, Count, Index) != SLIT_ELEMENT (LocalityPtr, Index, Count)) { IncrementErrorCount (); Print ( L"ERROR: Relative distances for Element[0x%lx][0x%lx] (%3d) and \n" - "Element[0x%lx][0x%lx] (%3d) do not match.\n", + L"Element[0x%lx][0x%lx] (%3d) do not match.\n", Count, Index, SLIT_ELEMENT (LocalityPtr, Count, Index), Index, Count, -- 2.14.3.windows.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [patch 2/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 build failure 2018-07-30 2:27 ` [patch 2/4] " Dandan Bi @ 2018-07-30 17:46 ` Carsey, Jaben 0 siblings, 0 replies; 9+ messages in thread From: Carsey, Jaben @ 2018-07-30 17:46 UTC (permalink / raw) To: Bi, Dandan, edk2-devel@lists.01.org; +Cc: Alexei Fedorov, Ni, Ruiyu Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> > -----Original Message----- > From: Bi, Dandan > Sent: Sunday, July 29, 2018 7:27 PM > To: edk2-devel@lists.01.org > Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>; Ni, Ruiyu > <ruiyu.ni@intel.com>; Carsey, Jaben <jaben.carsey@intel.com> > Subject: [patch 2/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 > build failure > Importance: High > > Fix following build error: > UefiShellAcpiViewCommandLib\AcpiParser.c(519) : > error C2308: concatenating mismatched strings > Concatenating wide "ERROR: %a: Offset Mismatch for %s" > with narrow "CurrentOffset = %d FieldOffset = %d" > > cc: Alexei Fedorov <Alexei.Fedorov@arm.com> > cc: Ruiyu Ni <ruiyu.ni@intel.com> > cc: Jaben Carsey <jaben.carsey@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Dandan Bi <dandan.bi@intel.com> > --- > ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 2 +- > .../Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c | 2 > +- > .../Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c | 6 > +++--- > .../Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c | 4 ++-- > 4 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > index 630c41b71d..18c4983e95 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > @@ -514,11 +514,11 @@ ParseAcpi ( > > if (Offset != Parser[Index].Offset) { > IncrementErrorCount (); > Print ( > L"\nERROR: %a: Offset Mismatch for %s\n" > - "CurrentOffset = %d FieldOffset = %d\n", > + L"CurrentOffset = %d FieldOffset = %d\n", > AsciiName, > Parser[Index].NameStr, > Offset, > Parser[Index].Offset > ); > diff --git > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parse > r.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parse > r.c > index bc8b7b00e3..e6185d2755 100644 > --- > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parse > r.c > +++ > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parse > r.c > @@ -118,11 +118,11 @@ ValidateNameSpaceStrLen ( > > if (NameSpaceStrLen < 2) { > IncrementErrorCount (); > Print ( > L"\nERROR: NamespaceString Length = %d. If no Namespace device > exists,\n" > - " then NamespaceString[] must contain a period '.'", > + L" then NamespaceString[] must contain a period '.'", > NameSpaceStrLen > ); > } > } > > diff --git > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtPars > er.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtPars > er.c > index a704b0c631..999ac698ec 100644 > --- > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtPars > er.c > +++ > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtPars > er.c > @@ -229,11 +229,11 @@ ParseAcpiMadt ( > if (((Offset + (*MadtInterruptControllerLength)) > AcpiTableLength) || > (*MadtInterruptControllerLength < 4)) { > IncrementErrorCount (); > Print ( > L"ERROR: Invalid Interrupt Controller Length," > - " Type = %d, Length = %d\n", > + L" Type = %d, Length = %d\n", > *MadtInterruptControllerType, > *MadtInterruptControllerLength > ); > break; > } > @@ -254,11 +254,11 @@ ParseAcpiMadt ( > case EFI_ACPI_6_2_GICD: { > if (++GICDCount > 1) { > IncrementErrorCount (); > Print ( > L"ERROR: Only one GICD must be present," > - " GICDCount = %d\n", > + L" GICDCount = %d\n", > GICDCount > ); > } > ParseAcpi ( > TRUE, > @@ -309,11 +309,11 @@ ParseAcpiMadt ( > > default: { > IncrementErrorCount (); > Print ( > L"ERROR: Unknown Interrupt Controller Structure," > - " Type = %d, Length = %d\n", > + L" Type = %d, Length = %d\n", > *MadtInterruptControllerType, > *MadtInterruptControllerLength > ); > } > } // switch > diff --git > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c > index c38666d2b7..6496a3d624 100644 > --- > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c > +++ > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c > @@ -117,11 +117,11 @@ ParseAcpiSlit ( > // Element[x][x] must be equal to 10 > if ((Count == Index) && (SLIT_ELEMENT (LocalityPtr, Count,Index) != 10)) > { > IncrementErrorCount (); > Print ( > L"ERROR: Diagonal Element[0x%lx][0x%lx] (%3d)." > - " Normalized Value is not 10\n", > + L" Normalized Value is not 10\n", > Count, > Index, > SLIT_ELEMENT (LocalityPtr, Count, Index) > ); > } > @@ -129,11 +129,11 @@ ParseAcpiSlit ( > if (SLIT_ELEMENT (LocalityPtr, Count, Index) != > SLIT_ELEMENT (LocalityPtr, Index, Count)) { > IncrementErrorCount (); > Print ( > L"ERROR: Relative distances for Element[0x%lx][0x%lx] (%3d) and \n" > - "Element[0x%lx][0x%lx] (%3d) do not match.\n", > + L"Element[0x%lx][0x%lx] (%3d) do not match.\n", > Count, > Index, > SLIT_ELEMENT (LocalityPtr, Count, Index), > Index, > Count, > -- > 2.14.3.windows.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS build failure 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 2:27 ` [patch 2/4] " Dandan Bi @ 2018-07-30 2:27 ` Dandan Bi 2018-07-30 8:27 ` Alexei Fedorov 2018-07-30 2:27 ` [patch 4/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix GCC " Dandan Bi 3 siblings, 1 reply; 9+ messages in thread From: Dandan Bi @ 2018-07-30 2:27 UTC (permalink / raw) To: edk2-devel; +Cc: Alexei Fedorov, Ruiyu Ni, Jaben Carsey 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> cc: Ruiyu Ni <ruiyu.ni@intel.com> cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <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 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS build failure 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 0 siblings, 1 reply; 9+ messages in thread From: Alexei Fedorov @ 2018-07-30 8:27 UTC (permalink / raw) To: Dandan Bi, edk2-devel@lists.01.org; +Cc: Ruiyu Ni, Jaben Carsey 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> 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 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> cc: Ruiyu Ni <ruiyu.ni@intel.com> cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <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. ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS build failure 2018-07-30 8:27 ` Alexei Fedorov @ 2018-07-30 8:49 ` Bi, Dandan 0 siblings, 0 replies; 9+ messages in thread From: Bi, Dandan @ 2018-07-30 8:49 UTC (permalink / raw) To: Alexei Fedorov, edk2-devel@lists.01.org; +Cc: Ni, Ruiyu, Carsey, Jaben 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. ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [patch 4/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix GCC build failure 2018-07-30 2:26 [patch 0/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix build issues Dandan Bi ` (2 preceding siblings ...) 2018-07-30 2:27 ` [patch 3/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS " Dandan Bi @ 2018-07-30 2:27 ` Dandan Bi 3 siblings, 0 replies; 9+ messages in thread From: Dandan Bi @ 2018-07-30 2:27 UTC (permalink / raw) To: edk2-devel; +Cc: Alexei Fedorov, Ruiyu Ni, Jaben Carsey Fix following GCC build issues: 1. xxx/SratParser.c:127:47: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] {L"Proximity Domain [31:8]", 3, 9, L"0x%x", DumpSratApicProximity, ^ xxx/SratParser.c:127:47: note: (near initialization for 'SratApciSapicAffinityParser[6].PrintFormatter') 2. xxx\UefiShellAcpiViewCommandLib.c:66:14: error: 'Status' may be used uninitialized in this fu nction [-Werror=maybe-uninitialized] EFI_STATUS Status; ^ cc: Alexei Fedorov <Alexei.Fedorov@arm.com> cc: Ruiyu Ni <ruiyu.ni@intel.com> cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> --- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c | 2 ++ .../Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c | 1 + 2 files changed, 3 insertions(+) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c index 043277aabf..e3f5567bec 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c @@ -46,10 +46,11 @@ ValidateSratReserved ( @param [in] Format Format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. **/ STATIC VOID +EFIAPI DumpSratApicProximity ( IN CONST CHAR16* Format, IN UINT8* Ptr ); @@ -170,10 +171,11 @@ ValidateSratReserved ( @param [in] Format Format string for tracing the data. @param [in] Ptr Pointer to the start of the buffer. **/ STATIC VOID +EFIAPI DumpSratApicProximity ( IN CONST CHAR16* Format, IN UINT8* Ptr ) { diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c index c2f40009ee..245700a253 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c @@ -64,10 +64,11 @@ RegisterAllParsers ( ) { EFI_STATUS Status; UINTN Count; + Status = EFI_SUCCESS; Count = sizeof (ParserList) / sizeof (ParserList[0]); while (Count-- != 0) { Status = RegisterParser ( ParserList[Count].Signature, -- 2.14.3.windows.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-07-30 17:47 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2018-07-30 2:27 ` [patch 4/4] ShellPkg/UefiShellAcpiViewCommandLib: Fix GCC " Dandan Bi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox