From: Ken Hornstein Date: Thu, 6 Mar 2014 04:31:31 +0000 (-0500) Subject: Fix up some warnings and problems when iconv doesn't exist. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/75960fa3577b190e8d64a889f68f9480a372ae4b Fix up some warnings and problems when iconv doesn't exist. --- diff --git a/uip/mhparse.c b/uip/mhparse.c index ec7db7a4..59f8b221 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -4155,7 +4155,10 @@ char *get_param_value(PM pm, char replace) int utf8; iconv_t cd; ICONV_CONST char *p; +#else /* HAVE_ICONV */ + char *p; #endif /* HAVE_ICONV */ + char *q; /* @@ -4230,9 +4233,10 @@ char *get_param_value(PM pm, char replace) *q = '\0'; return buffer; -#endif /* HAVE_ICONV */ noiconv: +#endif /* HAVE_ICONV */ + /* * Take everything non-ASCII and substituite the replacement character */ diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 295f43e8..8988b4b2 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -1159,13 +1159,13 @@ convert_charset (CT ct, char *dest_charset, int *message_mods) { if (ct->c_ctline) { char *ctline = concat(" ", ct->c_ctinfo.ci_type, "/", ct->c_ctinfo.ci_subtype, NULL); + char *outline; + replace_param(&ct->c_ctinfo.ci_first_pm, &ct->c_ctinfo.ci_last_pm, "charset", dest_charset, 0); - char *outline = output_params(strlen(TYPE_FIELD) + 1 + - strlen(ctline), - ct->c_ctinfo.ci_first_pm, - NULL, 0); + outline = output_params(strlen(TYPE_FIELD) + 1 + strlen(ctline), + ct->c_ctinfo.ci_first_pm, NULL, 0); if (outline) { ctline = add(outline, ctline); free(outline);