From 8921ba2fc5f6163bdad3b5902c5d9d638415dde0 Mon Sep 17 00:00:00 2001 From: Nigel Croxon Date: Mon, 14 Apr 2014 18:49:23 -0400 Subject: [PATCH] Cleaned up compile warnings. Signed-off-by: Nigel Croxon --- gnu-efi-3.0/apps/AllocPages.c | 3 ++- gnu-efi-3.0/apps/FreePages.c | 2 ++ gnu-efi-3.0/inc/ParseCmdLine.h | 2 +- gnu-efi-3.0/lib/ParseCmdLine.c | 8 ++++---- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gnu-efi-3.0/apps/AllocPages.c b/gnu-efi-3.0/apps/AllocPages.c index 72f528a..bafb6c5 100644 --- a/gnu-efi-3.0/apps/AllocPages.c +++ b/gnu-efi-3.0/apps/AllocPages.c @@ -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; diff --git a/gnu-efi-3.0/apps/FreePages.c b/gnu-efi-3.0/apps/FreePages.c index ef9c33b..af2c6eb 100644 --- a/gnu-efi-3.0/apps/FreePages.c +++ b/gnu-efi-3.0/apps/FreePages.c @@ -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; diff --git a/gnu-efi-3.0/inc/ParseCmdLine.h b/gnu-efi-3.0/inc/ParseCmdLine.h index 7d5bf96..899b70d 100644 --- a/gnu-efi-3.0/inc/ParseCmdLine.h +++ b/gnu-efi-3.0/inc/ParseCmdLine.h @@ -8,5 +8,5 @@ #define MAX_ARGS 512 -int ParseCmdLine(CHAR16 **argv[], CHAR16 *buf, int len); +int ParseCmdLine(CHAR16 *argv[], CHAR16 *buf, int len); diff --git a/gnu-efi-3.0/lib/ParseCmdLine.c b/gnu-efi-3.0/lib/ParseCmdLine.c index d23a274..7aa8e7c 100644 --- a/gnu-efi-3.0/lib/ParseCmdLine.c +++ b/gnu-efi-3.0/lib/ParseCmdLine.c @@ -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; }