From 28981267c53451651743a04b132c48e2399fcddf Mon Sep 17 00:00:00 2001 From: jcarsey Date: Tue, 11 Jun 2013 22:07:03 +0000 Subject: [PATCH] ShellPkg: Fix ARM build errors. submitted-by: Olivier Martin olivier.martin@arm.com> reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14400 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/ConsoleLogger.c | 2 -- ShellPkg/Include/Guid/ShellAliasGuid.h | 2 +- ShellPkg/Include/Guid/ShellVariableGuid.h | 2 +- ShellPkg/Include/ShellBase.h | 2 +- .../Library/UefiHandleParsingLib/UefiHandleParsingLib.c | 4 ++-- .../Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c | 1 + ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c | 1 + ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c | 1 + ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c | 1 + .../UefiShellDebug1CommandsLib/HexEdit/BufferImage.c | 2 ++ .../UefiShellDebug1CommandsLib/HexEdit/HexEditorTypes.h | 2 +- .../UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c | 1 - ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c | 1 - ShellPkg/Library/UefiShellLevel1CommandsLib/If.c | 6 ------ ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c | 2 +- 15 files changed, 13 insertions(+), 17 deletions(-) diff --git a/ShellPkg/Application/Shell/ConsoleLogger.c b/ShellPkg/Application/Shell/ConsoleLogger.c index 9fd971a655..0a2b1fa5e5 100644 --- a/ShellPkg/Application/Shell/ConsoleLogger.c +++ b/ShellPkg/Application/Shell/ConsoleLogger.c @@ -13,8 +13,6 @@ #include "Shell.h" -STATIC CONST CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL }; - /** Install our intermediate ConOut into the system table to keep a log of all the info that is displayed to the user. diff --git a/ShellPkg/Include/Guid/ShellAliasGuid.h b/ShellPkg/Include/Guid/ShellAliasGuid.h index 200e358688..346eef4209 100644 --- a/ShellPkg/Include/Guid/ShellAliasGuid.h +++ b/ShellPkg/Include/Guid/ShellAliasGuid.h @@ -22,4 +22,4 @@ extern EFI_GUID gShellAliasGuid; -#endif \ No newline at end of file +#endif diff --git a/ShellPkg/Include/Guid/ShellVariableGuid.h b/ShellPkg/Include/Guid/ShellVariableGuid.h index b93c94774b..46c9211def 100644 --- a/ShellPkg/Include/Guid/ShellVariableGuid.h +++ b/ShellPkg/Include/Guid/ShellVariableGuid.h @@ -22,4 +22,4 @@ extern EFI_GUID gShellVariableGuid; -#endif \ No newline at end of file +#endif diff --git a/ShellPkg/Include/ShellBase.h b/ShellPkg/Include/ShellBase.h index 576cd7b1a4..09f87b4cc0 100644 --- a/ShellPkg/Include/ShellBase.h +++ b/ShellPkg/Include/ShellBase.h @@ -154,4 +154,4 @@ SHELL_SECURITY_VIOLATION = 26, SHELL_NOT_EQUAL = 27 }SHELL_STATUS; -#endif //__SHELL_BASE__ \ No newline at end of file +#endif //__SHELL_BASE_ diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c index 37ac6e4289..45ee9bd5d0 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c @@ -349,8 +349,8 @@ TxtOutProtocolDumpInformation( Temp == NULL?L"":Temp, Index == Dev->Mode->Mode ? L'*' : L' ', Index, - !EFI_ERROR(Status)?Col:-1, - !EFI_ERROR(Status)?Row:-1 + !EFI_ERROR(Status)?(INTN)Col:-1, + !EFI_ERROR(Status)?(INTN)Row:-1 ); } FreePool(Temp); diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c index ff1d000aeb..179559833e 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c @@ -300,6 +300,7 @@ FileBufferRestoreMousePosition ( // backup the old screen attributes // Orig = MainEditor.ColorAttributes; + New.Data = 0; New.Colors.Foreground = Orig.Colors.Background; New.Colors.Background = Orig.Colors.Foreground; diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c index 649ed57955..58d3477f5f 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c @@ -149,6 +149,7 @@ InputBarRefresh ( CursorCol = gST->ConOut->Mode->CursorColumn; CursorRow = gST->ConOut->Mode->CursorRow; Orig.Data = gST->ConOut->Mode->Attribute; + New.Data = 0; New.Colors.Foreground = Orig.Colors.Background; New.Colors.Background = Orig.Colors.Foreground; diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c index 6722b7ae81..cf885c2549 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c @@ -111,6 +111,7 @@ StatusBarRefresh ( // back up the screen attributes // Orig.Data = gST->ConOut->Mode->Attribute; + New.Data = 0; New.Colors.Foreground = Orig.Colors.Background; New.Colors.Background = Orig.Colors.Foreground; diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c index c29ecc00fd..ad504561bb 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c @@ -107,6 +107,7 @@ MainTitleBarRefresh ( // backup the old screen attributes // Orig.Data = gST->ConOut->Mode->Attribute; + New.Data = 0; New.Colors.Foreground = Orig.Colors.Background; New.Colors.Background = Orig.Colors.Foreground; diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c index bfedf58d78..ba15a49ce1 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c @@ -580,6 +580,7 @@ HBufferImageRestoreMousePosition ( // backup the old screen attributes // Orig = HMainEditor.ColorAttributes; + New.Data = 0; New.Colors.Foreground = Orig.Colors.Background; New.Colors.Background = Orig.Colors.Foreground; @@ -755,6 +756,7 @@ HBufferImageRefresh ( UINTN Tmp; Orig = HMainEditor.ColorAttributes; + New.Data = 0; New.Colors.Foreground = Orig.Colors.Background; New.Colors.Background = Orig.Colors.Foreground; diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEditorTypes.h b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEditorTypes.h index 22f5c05566..ddd6070c94 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEditorTypes.h +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEditorTypes.h @@ -60,7 +60,7 @@ typedef struct { typedef union { HEFI_EDITOR_COLOR_ATTRIBUTES Colors; - UINT8 Data; + UINTN Data; } HEFI_EDITOR_COLOR_UNION; typedef struct { diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c index a40388ff40..4c346cc24e 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c @@ -290,7 +290,6 @@ HMainCommandSaveBuffer ( // the file won't be saved // return EFI_SUCCESS; - break; case L'c': case L'C': diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c index a2b520e1d1..b82bdf8f36 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c @@ -514,7 +514,6 @@ ShellCmdDriverConfigurationProcessActionRequired ( default: return (EFI_INVALID_PARAMETER); - break; } return EFI_SUCCESS; diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c index 54ed23b59b..f5bc12638b 100644 --- a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c +++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c @@ -166,7 +166,6 @@ TestOperation ( } } return (FALSE); - break; case OperatorUnsignedLessThan: case OperatorLessThan: if (ForceStringCompare || !ShellIsHexOrDecimalNumber(Compare1, FALSE, FALSE) || !ShellIsHexOrDecimalNumber(Compare2, FALSE, FALSE)) { @@ -202,7 +201,6 @@ TestOperation ( } return (FALSE); - break; case OperatorEqual: if (ForceStringCompare || !ShellIsHexOrDecimalNumber(Compare1, FALSE, FALSE) || !ShellIsHexOrDecimalNumber(Compare2, FALSE, FALSE)) { // @@ -230,7 +228,6 @@ TestOperation ( } } return (FALSE); - break; case OperatorNotEqual: if (ForceStringCompare || !ShellIsHexOrDecimalNumber(Compare1, FALSE, FALSE) || !ShellIsHexOrDecimalNumber(Compare2, FALSE, FALSE)) { // @@ -258,7 +255,6 @@ TestOperation ( } } return (FALSE); - break; case OperatorUnsignedGreaterOrEqual: case OperatorGreatorOrEqual: if (ForceStringCompare || !ShellIsHexOrDecimalNumber(Compare1, FALSE, FALSE) || !ShellIsHexOrDecimalNumber(Compare2, FALSE, FALSE)) { @@ -293,7 +289,6 @@ TestOperation ( } } return (FALSE); - break; case OperatorLessOrEqual: case OperatorUnsignedLessOrEqual: if (ForceStringCompare || !ShellIsHexOrDecimalNumber(Compare1, FALSE, FALSE) || !ShellIsHexOrDecimalNumber(Compare2, FALSE, FALSE)) { @@ -328,7 +323,6 @@ TestOperation ( } } return (FALSE); - break; default: ASSERT(FALSE); return (FALSE); diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c index 6fbb3e59a9..b8535139db 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c @@ -667,7 +667,7 @@ CheckAndSetTimeZone ( if (*Walker == L'-') { TheTime.TimeZone = (INT16)((ShellStrToUintn (++Walker)) * 60); } else { - TheTime.TimeZone = (INT16)((ShellStrToUintn (Walker)) * -60); + TheTime.TimeZone = (INT16)((INT16)(ShellStrToUintn (Walker)) * -60); } if (Walker2 != NULL) { Walker = Walker2 + 1; -- 2.39.2