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:
@ -87,6 +87,7 @@ CopySingleFile(
|
||||
Response = *Resp;
|
||||
List = NULL;
|
||||
DestVolumeInfo = NULL;
|
||||
ShellStatus = SHELL_SUCCESS;
|
||||
|
||||
ReadSize = PcdGet16(PcdShellFileOperationSize);
|
||||
// Why bother copying a file to itself
|
||||
@ -255,7 +256,7 @@ CopySingleFile(
|
||||
//
|
||||
// return
|
||||
//
|
||||
return (SHELL_SUCCESS);
|
||||
return ShellStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -537,12 +538,11 @@ ProcessValidateAndCopyFiles(
|
||||
{
|
||||
SHELL_STATUS ShellStatus;
|
||||
EFI_SHELL_FILE_INFO *List;
|
||||
EFI_STATUS Status;
|
||||
EFI_FILE_INFO *FileInfo;
|
||||
|
||||
List = NULL;
|
||||
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)DestDir, EFI_FILE_MODE_READ, &List);
|
||||
ShellOpenFileMetaArg((CHAR16*)DestDir, EFI_FILE_MODE_READ, &List);
|
||||
if (List != NULL && List->Link.ForwardLink != List->Link.BackLink) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MARG_ERROR), gShellLevel2HiiHandle, DestDir);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
|
@ -81,13 +81,11 @@ LoadDriver(
|
||||
{
|
||||
EFI_HANDLE LoadedDriverHandle;
|
||||
EFI_STATUS Status;
|
||||
EFI_DEVICE_PATH_PROTOCOL *Node;
|
||||
EFI_DEVICE_PATH_PROTOCOL *FilePath;
|
||||
EFI_LOADED_IMAGE_PROTOCOL *LoadedDriverImage;
|
||||
|
||||
LoadedDriverImage = NULL;
|
||||
FilePath = NULL;
|
||||
Node = NULL;
|
||||
LoadedDriverHandle = NULL;
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
|
@ -1025,7 +1025,6 @@ ShellCommandRunMap (
|
||||
CONST CHAR16 *SName;
|
||||
CONST CHAR16 *Mapping;
|
||||
EFI_HANDLE MapAsHandle;
|
||||
CONST EFI_DEVICE_PATH_PROTOCOL *DevPath;
|
||||
SHELL_STATUS ShellStatus;
|
||||
BOOLEAN SfoMode;
|
||||
BOOLEAN ConstMode;
|
||||
@ -1037,7 +1036,6 @@ ShellCommandRunMap (
|
||||
ProblemParam = NULL;
|
||||
Mapping = NULL;
|
||||
SName = NULL;
|
||||
DevPath = NULL;
|
||||
ShellStatus = SHELL_SUCCESS;
|
||||
MapAsHandle = NULL;
|
||||
|
||||
|
@ -135,7 +135,6 @@ GetDestinationLocation(
|
||||
{
|
||||
EFI_SHELL_FILE_INFO *DestList;
|
||||
EFI_SHELL_FILE_INFO *Node;
|
||||
EFI_STATUS Status;
|
||||
CHAR16 *DestPath;
|
||||
CHAR16 *TempLocation;
|
||||
UINTN NewSize;
|
||||
@ -159,7 +158,7 @@ GetDestinationLocation(
|
||||
//
|
||||
// get the destination path
|
||||
//
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)DestDir, EFI_FILE_MODE_WRITE|EFI_FILE_MODE_READ|EFI_FILE_MODE_CREATE, &DestList);
|
||||
ShellOpenFileMetaArg((CHAR16*)DestDir, EFI_FILE_MODE_WRITE|EFI_FILE_MODE_READ|EFI_FILE_MODE_CREATE, &DestList);
|
||||
if (DestList == NULL || IsListEmpty(&DestList->Link)) {
|
||||
//
|
||||
// Not existing... must be renaming
|
||||
|
@ -33,7 +33,6 @@ IsDirectoryEmpty (
|
||||
IN EFI_HANDLE FileHandle
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_FILE_INFO *FileInfo;
|
||||
BOOLEAN NoFile;
|
||||
BOOLEAN RetVal;
|
||||
@ -41,9 +40,9 @@ IsDirectoryEmpty (
|
||||
RetVal = TRUE;
|
||||
NoFile = FALSE;
|
||||
|
||||
for (Status = FileHandleFindFirstFile(FileHandle, &FileInfo)
|
||||
for (FileHandleFindFirstFile(FileHandle, &FileInfo)
|
||||
; !NoFile
|
||||
; Status = FileHandleFindNextFile(FileHandle, FileInfo, &NoFile)
|
||||
; FileHandleFindNextFile(FileHandle, FileInfo, &NoFile)
|
||||
){
|
||||
if (StrStr(FileInfo->FileName, L".") != FileInfo->FileName
|
||||
&&StrStr(FileInfo->FileName, L"..") != FileInfo->FileName) {
|
||||
|
@ -378,7 +378,6 @@ ShellCommandRunTime (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
LIST_ENTRY *Package;
|
||||
CHAR16 *Message;
|
||||
EFI_TIME TheTime;
|
||||
CHAR16 *ProblemParam;
|
||||
SHELL_STATUS ShellStatus;
|
||||
@ -387,13 +386,11 @@ ShellCommandRunTime (
|
||||
CONST CHAR16 *TempLocation;
|
||||
UINTN TzMinutes;
|
||||
|
||||
ShellStatus = SHELL_SUCCESS;
|
||||
ProblemParam = NULL;
|
||||
|
||||
//
|
||||
// Initialize variables
|
||||
//
|
||||
Message = NULL;
|
||||
ShellStatus = SHELL_SUCCESS;
|
||||
ProblemParam = NULL;
|
||||
|
||||
//
|
||||
// initialize the shell lib (we must be in non-auto-init...)
|
||||
|
Reference in New Issue
Block a user