From f7f4072fb55470c9e99b963276bdc7171d20636e Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Sat, 22 Oct 2016 13:44:47 +0100 Subject: [PATCH] Don't need to cast to `char *' for free(3) these days. But still need a cast to discard the const. Use `void *' as it saves needing to check the original type. --- uip/mhfixmsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uip/mhfixmsg.c b/uip/mhfixmsg.c index 7fd7caa9..ee25624c 100644 --- a/uip/mhfixmsg.c +++ b/uip/mhfixmsg.c @@ -2598,8 +2598,8 @@ fix_filename_encoding (CT ct) { const char *const new_params = concat (params, "\n", NULL); replace_substring (&hf->value, semicolon_loc, new_params); - free ((char *) new_params); - free ((char *) params); + free((void *)new_params); /* Cast away const. Sigh. */ + free((void *)params); } else { advise (NULL, "did not find semicolon in %s:%s\n", hf->name, hf->value); -- 2.56.0