aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-04-02 15:14:55 +0100
committerMatt Fleming <matt.fleming@intel.com>2012-04-17 10:58:34 +0100
commit1149eb499e93e7723ef32362dfa867aff8ab0c23 (patch)
treefffd5620dd7b7f4332ff91ab0b82a2d88f546073
parentdfcc2037c8c5222df0552c07492a35a65fe5af09 (diff)
downloadsyslinux-1149eb499e93e7723ef32362dfa867aff8ab0c23.tar.gz
syslinux-1149eb499e93e7723ef32362dfa867aff8ab0c23.tar.xz
syslinux-1149eb499e93e7723ef32362dfa867aff8ab0c23.zip
ldlinux: Cast some arguments to avoid compiler warnings
Specifically these warnings, execute.c: In function ‘execute’: execute.c:87:3: warning: passing argument 1 of ‘lfree’ discards qualifiers from pointer target type ../../../com32/include/com32.h:125:6: note: expected ‘void *’ but argument is of type ‘const char *’ execute.c:88:3: warning: passing argument 1 of ‘create_args_and_load’ discards qualifiers from pointer target type execute.c:40:12: note: expected ‘char *’ but argument is of type ‘const char *’ execute.c:111:2: warning: passing argument 1 of ‘lfree’ discards qualifiers from pointer target type ../../../com32/include/com32.h:125:6: note: expected ‘void *’ but argument is of type ‘const char *’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r--com32/elflink/ldlinux/execute.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/com32/elflink/ldlinux/execute.c b/com32/elflink/ldlinux/execute.c
index 269b74d8..7dde6cfa 100644
--- a/com32/elflink/ldlinux/execute.c
+++ b/com32/elflink/ldlinux/execute.c
@@ -84,8 +84,8 @@ void execute(const char *cmdline, enum kernel_type type)
if (type == KT_COM32) {
/* new entry for elf format c32 */
- lfree(kernel);
- create_args_and_load(cmdline);
+ lfree((void *)kernel);
+ create_args_and_load((char *)cmdline);
} else if (type == KT_CONFIG) {
char *argv[] = { "ldlinux.c32", NULL };
@@ -108,7 +108,7 @@ void execute(const char *cmdline, enum kernel_type type)
new_linux_kernel(kernel, cmdline);
}
- lfree(kernel);
+ lfree((void *)kernel);
/* If this returns, something went bad; return to menu */
}