From 0add5a2b425a2fa6e076ef580c27698a4311dff8 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Sat, 16 Feb 2013 22:42:34 -0500 Subject: [PATCH] Fix const warning in jlibtool --- scripts/jlibtool.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/jlibtool.c b/scripts/jlibtool.c index e5a3a6a..d0097b2 100644 --- a/scripts/jlibtool.c +++ b/scripts/jlibtool.c @@ -545,7 +545,8 @@ static int run_command(command_t *cmd_data, count_chars *cc) { int ret; char *command; - char *raw; + char *tmp; + const char *raw; const char *spawn_args[4]; count_chars tmpcc; @@ -561,7 +562,9 @@ static int run_command(command_t *cmd_data, count_chars *cc) raw = flatten_count_chars(&tmpcc, 1); command = shell_esc(raw); - free(raw); + + memcpy(&tmp, &raw, sizeof(tmp)); + free(tmp); spawn_args[0] = SHELL_CMD; spawn_args[1] = "-c"; -- 2.1.4