ShellPkg: Fixed build error 'variable set but not used'

GCC toolchain cannot build ShellPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Signed-off-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Jaben Carsey <Jaben.Carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14326 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jcarsey
2013-05-07 17:57:58 +00:00
parent 5e5bb2a9ba
commit e755a4ca10
22 changed files with 15 additions and 105 deletions

View File

@ -752,7 +752,6 @@ HBufferImageRefresh (
UINTN StartRow;
UINTN EndRow;
UINTN FStartRow;
UINTN FEndRow;
UINTN Tmp;
Orig = HMainEditor.ColorAttributes;
@ -821,7 +820,6 @@ HBufferImageRefresh (
}
FStartRow = StartRow;
FEndRow = EndRow;
StartRow = 2 + StartRow - HBufferImage.LowVisibleRow;
EndRow = 2 + EndRow - HBufferImage.LowVisibleRow;
@ -1750,14 +1748,11 @@ HBufferImagePageUp (
VOID
)
{
HEFI_EDITOR_LINE *Line;
UINTN FRow;
UINTN FCol;
UINTN Gap;
INTN Retreat;
Line = HBufferImage.CurrentLine;
FRow = HBufferImage.BufferPosition.Row;
FCol = HBufferImage.BufferPosition.Column;
@ -1776,11 +1771,6 @@ HBufferImagePageUp (
Retreat = Gap;
Retreat = -Retreat;
//
// get correct line
//
Line = HMoveLine (Retreat);
FRow -= Gap;
HBufferImageMovePosition (FRow, FCol, HBufferImage.HighBits);
@ -1798,13 +1788,10 @@ HBufferImageHome (
VOID
)
{
HEFI_EDITOR_LINE *Line;
UINTN FRow;
UINTN FCol;
BOOLEAN HighBits;
Line = HBufferImage.CurrentLine;
//
// curosr will at the high bit
//
@ -1918,7 +1905,6 @@ HBufferImageDeleteCharacterFromBuffer (
HEFI_EDITOR_LINE *Line;
LIST_ENTRY *Link;
UINTN StartRow;
UINTN OldFCol;
UINTN OldFRow;
@ -1928,11 +1914,6 @@ HBufferImageDeleteCharacterFromBuffer (
EFI_STATUS Status;
//
// get the line that start position is at
//
StartRow = Pos / 0x10;
Size = HBufferImageGetTotalSize ();
if (Size < Count) {
@ -2054,7 +2035,6 @@ HBufferImageAddCharacterToBuffer (
HEFI_EDITOR_LINE *Line;
LIST_ENTRY *Link;
UINTN StartRow;
UINTN OldFCol;
UINTN OldFRow;
@ -2062,11 +2042,6 @@ HBufferImageAddCharacterToBuffer (
UINTN NewPos;
//
// get the line that start position is at
//
StartRow = Pos / 0x10;
Size = HBufferImageGetTotalSize ();
//

View File

@ -181,11 +181,7 @@ HDiskImageRead (
UINTN Bytes;
HEFI_EDITOR_LINE *Line;
UINT64 ByteOffset;
EDIT_FILE_TYPE BufferTypeBackup;
BufferTypeBackup = HBufferImage.BufferType;
HBufferImage.BufferType = FileTypeDiskBuffer;
DevicePath = gEfiShellProtocol->GetDevicePathFromMap(DeviceName);
@ -226,8 +222,6 @@ HDiskImageRead (
return EFI_OUT_OF_RESOURCES;
}
ByteOffset = MultU64x32 (Offset, BlkIo->Media->BlockSize);
//
// read from disk
//
@ -355,10 +349,6 @@ HDiskImageSave (
VOID *Buffer;
UINTN Bytes;
UINT64 ByteOffset;
EDIT_FILE_TYPE BufferTypeBackup;
//
// if not modified, directly return
//
@ -366,7 +356,6 @@ HDiskImageSave (
return EFI_SUCCESS;
}
BufferTypeBackup = HBufferImage.BufferType;
HBufferImage.BufferType = FileTypeDiskBuffer;
DevicePath = gEfiShellProtocol->GetDevicePathFromMap(DeviceName);
@ -406,8 +395,6 @@ HDiskImageSave (
return Status;
}
ByteOffset = MultU64x32 (Offset, BlkIo->Media->BlockSize);
//
// write the buffer to disk
//

View File

@ -43,25 +43,19 @@ ShellCommandRunHexEdit (
CHAR16 *ProblemParam;
SHELL_STATUS ShellStatus;
LIST_ENTRY *Package;
CONST CHAR16 *Cwd;
CHAR16 *NewName;
CHAR16 *Spot;
CONST CHAR16 *Name;
UINTN Offset;
UINTN Size;
UINT64 LastOffset;
EDIT_FILE_TYPE WhatToDo;
Buffer = NULL;
ShellStatus = SHELL_SUCCESS;
NewName = NULL;
Cwd = NULL;
Buffer = NULL;
Name = NULL;
Spot = NULL;
Offset = 0;
Size = 0;
LastOffset = 0;
WhatToDo = FileTypeNone;
//

View File

@ -598,7 +598,6 @@ HMainCommandCut (
)
{
UINTN Index;
HEFI_EDITOR_LINE *Line;
LIST_ENTRY *Link;
UINT8 *Buffer;
UINTN Count;
@ -623,8 +622,6 @@ HMainCommandCut (
Link = Link->ForwardLink;
}
Line = CR (Link, HEFI_EDITOR_LINE, Link, EFI_EDITOR_LINE_LIST);
Count = HMainEditor.SelectEnd - HMainEditor.SelectStart + 1;
Buffer = AllocateZeroPool (Count);
if (Buffer == NULL) {

View File

@ -190,9 +190,6 @@ HMemImageRead (
CHAR16 *Str;
HEFI_EDITOR_LINE *Line;
EDIT_FILE_TYPE BufferTypeBackup;
BufferTypeBackup = HBufferImage.BufferType;
HBufferImage.BufferType = FileTypeMemBuffer;
Buffer = AllocateZeroPool (Size);
@ -301,8 +298,6 @@ HMemImageSave (
EFI_STATUS Status;
VOID *Buffer;
EDIT_FILE_TYPE BufferTypeBackup;
//
// not modified, so directly return
//
@ -310,7 +305,6 @@ HMemImageSave (
return EFI_SUCCESS;
}
BufferTypeBackup = HBufferImage.BufferType;
HBufferImage.BufferType = FileTypeMemBuffer;
Buffer = AllocateZeroPool (Size);