Cleaned up compile warnings.

Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
This commit is contained in:
Nigel Croxon 2014-04-14 18:49:23 -04:00
parent 42cca551db
commit 8921ba2fc5
4 changed files with 9 additions and 6 deletions

View File

@ -115,8 +115,9 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
CHAR16 *argv[MAX_ARGS];
INTN argc = 0;
INTN err = 0;
#if DEBUG
INTN c = 0;
#endif
INTN AllocType = -1;
INTN MemType = -1;
INTN NumPages = -1;

View File

@ -88,7 +88,9 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
CHAR16 arglist[MAX_ARGS+1] = {0};
CHAR16 *argv[MAX_ARGS];
INTN argc = 0;
#if DEBUG
INTN c = 0;
#endif
INTN err = 0;
INTN PgCnt = -1;

View File

@ -8,5 +8,5 @@
#define MAX_ARGS 512
int ParseCmdLine(CHAR16 **argv[], CHAR16 *buf, int len);
int ParseCmdLine(CHAR16 *argv[], CHAR16 *buf, int len);

View File

@ -11,14 +11,14 @@
int ParseCmdLine(CHAR16 **argv[], CHAR16 *LoadOptions, int LoadOptionSize)
int ParseCmdLine(CHAR16 *argv[], CHAR16 *LoadOptions, int LoadOptionSize)
{
CHAR16 *buf = LoadOptions;
int len = LoadOptionSize;
int i; // Index into buf
int argc = 0; // Count of argv entries
*argv[argc++] = LoadOptions ? LoadOptions: L"##NoName##";
argv[argc++] = LoadOptions ? LoadOptions: L"##NoName##";
for ( i = 0; len > 0; len-= 2, i++) {
if ( buf[i] == L' ' ) {
@ -28,11 +28,11 @@ int ParseCmdLine(CHAR16 **argv[], CHAR16 *LoadOptions, int LoadOptionSize)
len -= 2;
i++;
} while( (buf[i] == L' ') && (len > 0) );
*argv[argc] = &buf[i];
argv[argc] = &buf[i];
if ( len > 0 ) argc++;
}
}
*argv[argc] = NULL;
argv[argc] = NULL;
return argc;
}