mirror of https://github.com/acidanthera/audk.git
ShellPkg: Fix several GCC compiler warnings
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10890 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a48ea69457
commit
e97233217e
|
@ -488,7 +488,9 @@ EfiShellGetDevicePathFromFilePath(
|
||||||
NewPath = AllocateZeroPool(Size);
|
NewPath = AllocateZeroPool(Size);
|
||||||
ASSERT(NewPath != NULL);
|
ASSERT(NewPath != NULL);
|
||||||
StrCpy(NewPath, Cwd);
|
StrCpy(NewPath, Cwd);
|
||||||
if (NewPath[StrLen(NewPath)-1] == Path[0] == (CHAR16)L'\\') {
|
if ((NewPath[0] == (CHAR16)L'\\') &&
|
||||||
|
(NewPath[StrLen(NewPath)-1] == (CHAR16)L'\\')
|
||||||
|
) {
|
||||||
((CHAR16*)NewPath)[StrLen(NewPath)-1] = CHAR_NULL;
|
((CHAR16*)NewPath)[StrLen(NewPath)-1] = CHAR_NULL;
|
||||||
}
|
}
|
||||||
StrCat(NewPath, Path);
|
StrCat(NewPath, Path);
|
||||||
|
@ -2958,7 +2960,7 @@ EFI_SHELL_PROTOCOL mShellProtocol = {
|
||||||
|
|
||||||
This must be removed via calling CleanUpShellProtocol().
|
This must be removed via calling CleanUpShellProtocol().
|
||||||
|
|
||||||
@param[in,out] NewShell The pointer to the pointer to the structure
|
@param[in,out] NewShell The pointer to the pointer to the structure
|
||||||
to install.
|
to install.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation was successful.
|
@retval EFI_SUCCESS The operation was successful.
|
||||||
|
@ -3071,7 +3073,7 @@ CreatePopulateInstallShellProtocol (
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Opposite of CreatePopulateInstallShellProtocol.
|
Opposite of CreatePopulateInstallShellProtocol.
|
||||||
|
|
||||||
Free all memory and restore the system to the state it was in before calling
|
Free all memory and restore the system to the state it was in before calling
|
||||||
CreatePopulateInstallShellProtocol.
|
CreatePopulateInstallShellProtocol.
|
||||||
|
|
|
@ -62,7 +62,7 @@ IsNextFragment (
|
||||||
//
|
//
|
||||||
*Statement+=StrLen(Fragment);
|
*Statement+=StrLen(Fragment);
|
||||||
while (*Statement[0] == L' ') {
|
while (*Statement[0] == L' ') {
|
||||||
*Statement++;
|
Statement++;
|
||||||
}
|
}
|
||||||
FreePool(Tester);
|
FreePool(Tester);
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
@ -302,6 +302,9 @@ TestOperation (
|
||||||
}
|
}
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(FALSE);
|
||||||
|
return (FALSE);
|
||||||
}
|
}
|
||||||
ASSERT(FALSE);
|
ASSERT(FALSE);
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
|
|
|
@ -111,6 +111,8 @@ CopySingleFile(
|
||||||
*Resp = Response;
|
*Resp = Response;
|
||||||
case ShellPromptResponseYes:
|
case ShellPromptResponseYes:
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return SHELL_ABORTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -790,9 +790,9 @@ IsNumberLetterOnly(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
while(String != NULL && *String != CHAR_NULL) {
|
while(String != NULL && *String != CHAR_NULL) {
|
||||||
if (! ( *String >= L'a' && *String <= L'z'
|
if (! ((*String >= L'a' && *String <= L'z') ||
|
||||||
|| *String >= L'A' && *String <= L'Z'
|
(*String >= L'A' && *String <= L'Z') ||
|
||||||
|| *String >= L'0' && *String <= L'9')
|
(*String >= L'0' && *String <= L'9'))
|
||||||
){
|
){
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue