]> granicus.if.org Git - graphviz/commitdiff
fix uninitialized variable warning
authorellson <devnull@localhost>
Tue, 26 Sep 2006 15:33:37 +0000 (15:33 +0000)
committerellson <devnull@localhost>
Tue, 26 Sep 2006 15:33:37 +0000 (15:33 +0000)
lib/common/psusershape.c

index c7cfd4a1eed7e430a8dd68a53bb2ea6030a4a03f..bb4560b62ccb9ba2bc896cf7051141fda5e66d62 100644 (file)
@@ -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)