]> diplodocus.org Git - nmh/commitdiff
Fix up some warnings and problems when iconv doesn't exist.
authorKen Hornstein <kenh@pobox.com>
Thu, 6 Mar 2014 04:31:31 +0000 (23:31 -0500)
committerKen Hornstein <kenh@pobox.com>
Thu, 6 Mar 2014 04:31:31 +0000 (23:31 -0500)
uip/mhparse.c
uip/mhshowsbr.c

index ec7db7a..59f8b22 100644 (file)
@@ -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
      */
index 295f43e..8988b4b 100644 (file)
@@ -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);