]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Fixed build errors related to variable declarations
authorOlivier Martin <olivier.martin@arm.com>
Tue, 27 Aug 2013 09:01:54 +0000 (09:01 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 27 Aug 2013 09:01:54 +0000 (09:01 +0000)
- 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

ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c

index 087befd79028af2e49f427653291233a3410bd14..ae36807958ffafecbf6f9b3abffa67a286e9b6a5 100644 (file)
@@ -286,7 +286,6 @@ ValidateAndCopyFiles(
   VOID                      *Response;\r
   UINTN                     PathLen;\r
   CONST CHAR16              *Cwd;\r
-  CONST CHAR16              *TempLocation;\r
   UINTN                     NewSize;\r
 \r
   if (Resp == NULL) {\r
@@ -479,7 +478,7 @@ ValidateAndCopyFiles(
       break;\r
     }\r
 \r
-    if ((TempLocation = StrniCmp(Node->FullName, DestPath, StrLen(Node->FullName))) == 0\r
+    if ((StrniCmp(Node->FullName, DestPath, StrLen(Node->FullName)) == 0)\r
       && (DestPath[StrLen(Node->FullName)] == CHAR_NULL || DestPath[StrLen(Node->FullName)] == L'\\')\r
       ) {\r
       ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_SD_SAME), gShellLevel2HiiHandle);\r
@@ -552,7 +551,6 @@ ProcessValidateAndCopyFiles(
   } else if (List != NULL) {\r
     ASSERT(((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink) != NULL);\r
     ASSERT(((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink)->FullName != NULL);\r
-    FileInfo    = NULL;\r
     FileInfo = gEfiShellProtocol->GetFileInfo(((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink)->Handle);\r
     ASSERT(FileInfo != NULL);\r
     StrnCatGrow(&FullName, NULL, ((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink)->FullName, 0);\r
index 9ce915b96c4a98c77bc92f582383b1c7adeb1310..0d01ad7487be4aea8063c11f0bfe6004c14096e9 100644 (file)
@@ -136,7 +136,6 @@ GetDestinationLocation(
   EFI_SHELL_FILE_INFO       *DestList;\r
   EFI_SHELL_FILE_INFO       *Node;\r
   CHAR16                    *DestPath;\r
-  CHAR16                    *TempLocation;\r
   UINTN                     NewSize;\r
 \r
   DestList = NULL;\r
@@ -163,7 +162,7 @@ GetDestinationLocation(
     //\r
     // Not existing... must be renaming\r
     //\r
-    if ((TempLocation = StrStr(DestDir, L":")) == NULL) {\r
+    if (StrStr(DestDir, L":") == NULL) {\r
       if (Cwd == NULL) {\r
         ShellCloseFileMetaArg(&DestList);\r
         return (SHELL_INVALID_PARAMETER);\r