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
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2025 Red Hat, Inc.