]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/Shell/ShellProtocol.c
ShellPkg: Fix several GCC compiler warnings
[mirror_edk2.git] / ShellPkg / Application / Shell / ShellProtocol.c
index 214693f2ae37dbeff58762930eab5740c5b42d5e..27488ab62ee238aaabc2a3a4c8b5f060076c72f7 100644 (file)
@@ -488,7 +488,9 @@ EfiShellGetDevicePathFromFilePath(
     NewPath = AllocateZeroPool(Size);\r
     ASSERT(NewPath != NULL);\r
     StrCpy(NewPath, Cwd);\r
-    if (NewPath[StrLen(NewPath)-1] == Path[0] == (CHAR16)L'\\') {\r
+    if ((NewPath[0] == (CHAR16)L'\\') &&\r
+        (NewPath[StrLen(NewPath)-1] == (CHAR16)L'\\')\r
+       ) {\r
       ((CHAR16*)NewPath)[StrLen(NewPath)-1] = CHAR_NULL;\r
     }\r
     StrCat(NewPath, Path);\r
@@ -2958,7 +2960,7 @@ EFI_SHELL_PROTOCOL         mShellProtocol = {
 \r
   This must be removed via calling CleanUpShellProtocol().\r
 \r
-  @param[in,out] NewShell   The pointer to the pointer to the structure \r
+  @param[in,out] NewShell   The pointer to the pointer to the structure\r
   to install.\r
 \r
   @retval EFI_SUCCESS     The operation was successful.\r
@@ -3071,7 +3073,7 @@ CreatePopulateInstallShellProtocol (
 }\r
 \r
 /**\r
-  Opposite of CreatePopulateInstallShellProtocol.  \r
+  Opposite of CreatePopulateInstallShellProtocol.\r
 \r
   Free all memory and restore the system to the state it was in before calling\r
   CreatePopulateInstallShellProtocol.\r