]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: cast return value to correct type based on what we passed in.
authorJaben Carsey <Jaben.carsey@intel.com>
Wed, 4 Feb 2015 01:23:14 +0000 (01:23 +0000)
committershenshushi <shenshushi@Edk2>
Wed, 4 Feb 2015 01:23:14 +0000 (01:23 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Joe Peterson <joe.peterson@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16734 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Application/Shell/Shell.c

index ba071e58ed6f0b7e3354b0885d0d967888ac1827..dbf4d61aa9315bc1469463cd19c489fe1c02e170 100644 (file)
@@ -1302,9 +1302,9 @@ StripUnreplacedEnvironmentVariables(
   CHAR16 *CurrentLocator;\r
 \r
   for (CurrentLocator = CmdLine ; CurrentLocator != NULL ; ) {\r
-    FirstQuote = FindFirstCharacter(CurrentLocator, L"\"", L'^');\r
-    FirstPercent = FindFirstCharacter(CurrentLocator, L"%", L'^');\r
-    SecondPercent = FirstPercent!=NULL?FindFirstCharacter(FirstPercent+1, L"%", L'^'):NULL;\r
+    FirstQuote = (CHAR16*)FindFirstCharacter(CurrentLocator, L"\"", L'^');\r
+    FirstPercent = (CHAR16*)FindFirstCharacter(CurrentLocator, L"%", L'^');\r
+    SecondPercent = FirstPercent!=NULL?(CHAR16*)FindFirstCharacter(FirstPercent+1, L"%", L'^'):NULL;\r
     if (FirstPercent == NULL || SecondPercent == NULL) {\r
       //\r
       // If we ever dont have 2 % we are done.\r
@@ -1313,7 +1313,7 @@ StripUnreplacedEnvironmentVariables(
     }\r
 \r
     if (FirstQuote!= NULL && FirstQuote < FirstPercent) {\r
-      SecondQuote = FindFirstCharacter(FirstQuote+1, L"\"", L'^');\r
+      SecondQuote = (CHAR16*)FindFirstCharacter(FirstQuote+1, L"\"", L'^');\r
       //\r
       // Quote is first found\r
       //\r