From: ellson Date: Tue, 26 Sep 2006 15:33:37 +0000 (+0000) Subject: fix uninitialized variable warning X-Git-Tag: LAST_LIBGRAPH~32^2~5868 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00dd2d86ceeef255c77b1eb339b41187cacdf28a;p=graphviz fix uninitialized variable warning --- diff --git a/lib/common/psusershape.c b/lib/common/psusershape.c index c7cfd4a1e..bb4560b62 100644 --- a/lib/common/psusershape.c +++ b/lib/common/psusershape.c @@ -228,20 +228,25 @@ char *ps_string(char *ins, int latin) if (latin) base = utf8ToLatin1 (ins); - else switch (charsetOf (ins)) { - case ASCII : - base = ins; - break; - case LATIN1 : - base = utf8ToLatin1 (ins); - break; - case NONLATIN : - if (!warned) { - agerr (AGWARN, "UTF-8 input uses non-Latin1 characters which cannot be handled in PostScript output"); - warned = 1; + else { + switch (charsetOf (ins)) { + case ASCII : + base = ins; + break; + case LATIN1 : + base = utf8ToLatin1 (ins); + break; + case NONLATIN : + if (!warned) { + agerr (AGWARN, "UTF-8 input uses non-Latin1 characters which cannot be handled in PostScript output"); + warned = 1; + } + base = ins; + break; + default: + base = ins; + break; } - base = ins; - break; } if (xb.buf == NULL)