From e6f958d15d710da19dca3fb38943d83f1b3532d6 Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Mon, 30 Jul 2018 09:31:36 +0800 Subject: [PATCH] ShellPkg/UefiShellAcpiViewCommandLib: Fix VS2012 build failure 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 cc: Ruiyu Ni cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi Reviewed-by: Jaben Carsey --- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 2 +- .../UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c | 2 +- .../UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c | 6 +++--- .../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 @@ -516,7 +516,7 @@ ParseAcpi ( 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, 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 @@ -120,7 +120,7 @@ ValidateNameSpaceStrLen ( 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 @@ -231,7 +231,7 @@ ParseAcpiMadt ( IncrementErrorCount (); Print ( L"ERROR: Invalid Interrupt Controller Length," - " Type = %d, Length = %d\n", + L" Type = %d, Length = %d\n", *MadtInterruptControllerType, *MadtInterruptControllerLength ); @@ -256,7 +256,7 @@ ParseAcpiMadt ( IncrementErrorCount (); Print ( L"ERROR: Only one GICD must be present," - " GICDCount = %d\n", + L" GICDCount = %d\n", GICDCount ); } @@ -311,7 +311,7 @@ ParseAcpiMadt ( IncrementErrorCount (); Print ( L"ERROR: Unknown Interrupt Controller Structure," - " Type = %d, Length = %d\n", + L" Type = %d, Length = %d\n", *MadtInterruptControllerType, *MadtInterruptControllerLength ); 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 @@ -119,7 +119,7 @@ ParseAcpiSlit ( 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) @@ -131,7 +131,7 @@ ParseAcpiSlit ( 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), -- 2.39.2