ShellPkg: Fixed build errors related to variable declarations

- variable "TempLocation" was set but never used

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



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14605 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Olivier Martin
2013-08-27 09:01:54 +00:00
committed by oliviermartin
parent 253fcc8bdc
commit 5051c2873b
2 changed files with 2 additions and 5 deletions

View File

@ -286,7 +286,6 @@ ValidateAndCopyFiles(
VOID *Response; VOID *Response;
UINTN PathLen; UINTN PathLen;
CONST CHAR16 *Cwd; CONST CHAR16 *Cwd;
CONST CHAR16 *TempLocation;
UINTN NewSize; UINTN NewSize;
if (Resp == NULL) { if (Resp == NULL) {
@ -479,7 +478,7 @@ ValidateAndCopyFiles(
break; break;
} }
if ((TempLocation = StrniCmp(Node->FullName, DestPath, StrLen(Node->FullName))) == 0 if ((StrniCmp(Node->FullName, DestPath, StrLen(Node->FullName)) == 0)
&& (DestPath[StrLen(Node->FullName)] == CHAR_NULL || DestPath[StrLen(Node->FullName)] == L'\\') && (DestPath[StrLen(Node->FullName)] == CHAR_NULL || DestPath[StrLen(Node->FullName)] == L'\\')
) { ) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_SD_SAME), gShellLevel2HiiHandle); ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_SD_SAME), gShellLevel2HiiHandle);
@ -552,7 +551,6 @@ ProcessValidateAndCopyFiles(
} else if (List != NULL) { } else if (List != NULL) {
ASSERT(((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink) != NULL); ASSERT(((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink) != NULL);
ASSERT(((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink)->FullName != NULL); ASSERT(((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink)->FullName != NULL);
FileInfo = NULL;
FileInfo = gEfiShellProtocol->GetFileInfo(((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink)->Handle); FileInfo = gEfiShellProtocol->GetFileInfo(((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink)->Handle);
ASSERT(FileInfo != NULL); ASSERT(FileInfo != NULL);
StrnCatGrow(&FullName, NULL, ((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink)->FullName, 0); StrnCatGrow(&FullName, NULL, ((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink)->FullName, 0);

View File

@ -136,7 +136,6 @@ GetDestinationLocation(
EFI_SHELL_FILE_INFO *DestList; EFI_SHELL_FILE_INFO *DestList;
EFI_SHELL_FILE_INFO *Node; EFI_SHELL_FILE_INFO *Node;
CHAR16 *DestPath; CHAR16 *DestPath;
CHAR16 *TempLocation;
UINTN NewSize; UINTN NewSize;
DestList = NULL; DestList = NULL;
@ -163,7 +162,7 @@ GetDestinationLocation(
// //
// Not existing... must be renaming // Not existing... must be renaming
// //
if ((TempLocation = StrStr(DestDir, L":")) == NULL) { if (StrStr(DestDir, L":") == NULL) {
if (Cwd == NULL) { if (Cwd == NULL) {
ShellCloseFileMetaArg(&DestList); ShellCloseFileMetaArg(&DestList);
return (SHELL_INVALID_PARAMETER); return (SHELL_INVALID_PARAMETER);