]> granicus.if.org Git - graphviz/commitdiff
Fix: cc-1241 cc: ERROR File = neatoinit.c, Line = 675
authorellson <devnull@localhost>
Tue, 19 Jul 2005 13:08:22 +0000 (13:08 +0000)
committerellson <devnull@localhost>
Tue, 19 Jul 2005 13:08:22 +0000 (13:08 +0000)
  A declaration cannot appear after an executable statement in a block.

lib/neatogen/neatoinit.c

index afe0cbcc64ab3335ae8cc50cb836fcbc2b669f3b..f477ef1c4685a19a9bcd9e2b47c73e9545a8e264 100644 (file)
@@ -668,12 +668,12 @@ static int checkEdge(PointMap * pm, edge_t * ep, int idx)
 static void
 dfsCycle (vtx_data* graph, int i)
 {
-    node_t* np = graph[i].np;
-    node_t* hp;
-    ND_mark(np) = TRUE;
-    ND_onstack(np) = TRUE;
+    node_t *np, *hp;
     int j, e, f;
 
+    np = graph[i].np;
+    ND_mark(np) = TRUE;
+    ND_onstack(np) = TRUE;
     for (e = 1; e < graph[i].nedges; e++) {
        if (graph[i].edists[e] == 1.0) continue;  /* in edge */
        j = graph[i].edges[e];