From 3664450f21f246cf9ebbdc21bf52eb60b6de890e Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Wed, 16 Mar 2011 13:18:41 +0000 Subject: [PATCH] ldlinux: Fix compiler warnings in cli.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Make the compiler happy by casting away the following warnings, cli.c: In function ‘process_command’: cli.c:381:2: warning: passing argument 1 of ‘strtok’ discards qualifiers from pointer target type ../../../com32/include/string.h:44:16: note: expected ‘char *’ but argument is of type ‘const char *’ cli.c:400:3: warning: passing argument 2 of ‘spawn_load’ from incompatible pointer type ../../../com32/include/sys/exec.h:43:12: note: expected ‘const char **’ but argument is of type ‘char **’ Signed-off-by: Matt Fleming --- com32/elflink/ldlinux/cli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c index 03befe5..0e0827d 100644 --- a/com32/elflink/ldlinux/cli.c +++ b/com32/elflink/ldlinux/cli.c @@ -378,7 +378,7 @@ void process_command(const char *cmd, bool history) // dprintf("raw cmd = %s", cmd); strcpy(temp_cmd, cmd); - module_name = strtok(cmd, COMMAND_DELIM); + module_name = strtok((char *)cmd, COMMAND_DELIM); len_mn = strlen(module_name); if (!strcmp(module_name + len_mn - 4, ".c32")) { @@ -397,7 +397,7 @@ void process_command(const char *cmd, bool history) } while (argc < MAX_COMMAND_ARGS); argv[argc] = NULL; module_load_dependencies(module_name, MODULES_DEP); - spawn_load(module_name, argv); + spawn_load(module_name, (const char **)argv); } else if (!strcmp(module_name + len_mn - 2, ".0")) { execute(cmd, KT_PXE); } else if (!strcmp(module_name + len_mn - 3, ".bs")) { -- 2.7.4