[syslinux:elflink] ldlinux: Cast some arguments to avoid compiler warnings
syslinux-bot for Matt Fleming
matt.fleming at intel.com
Tue Apr 17 11:24:15 PDT 2012
Commit-ID: 1149eb499e93e7723ef32362dfa867aff8ab0c23
Gitweb: http://www.syslinux.org/commit/1149eb499e93e7723ef32362dfa867aff8ab0c23
Author: Matt Fleming <matt.fleming at intel.com>
AuthorDate: Mon, 2 Apr 2012 15:14:55 +0100
Committer: Matt Fleming <matt.fleming at intel.com>
CommitDate: Tue, 17 Apr 2012 10:58:34 +0100
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 at intel.com>
---
com32/elflink/ldlinux/execute.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/com32/elflink/ldlinux/execute.c b/com32/elflink/ldlinux/execute.c
index 269b74d..7dde6cf 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 */
}
More information about the Syslinux-commits
mailing list