]> granicus.if.org Git - graphviz/commitdiff
Fix non-standard declaration in middle of function body; move declaration
authorerg <devnull@localhost>
Fri, 25 Jul 2008 20:15:19 +0000 (20:15 +0000)
committererg <devnull@localhost>
Fri, 25 Jul 2008 20:15:19 +0000 (20:15 +0000)
to stop.

cmd/gvpr/compile.c

index e0815df25738ab4e7381fa988fd64363d28bae95..48401a2b3b929737c1e1458d4ee79fdc27847311 100644 (file)
@@ -553,6 +553,7 @@ getval(Expr_t * pgm, Exnode_t * node, Exid_t * sym, Exref_t * ref,
     Agnode_t *np;
     Agnode_t *hp;
     Agedge_t *ep;
+    char* name;
 
     assert(sym->lex != CONSTANT);
     if (elt == EX_CALL) {
@@ -1235,7 +1236,7 @@ getval(Expr_t * pgm, Exnode_t * node, Exid_t * sym, Exref_t * ref,
        case F_hasattr:
        case F_get:
            objp = INT2PTR(Agobj_t *, args[0].integer);
-           char* name = args[1].string;
+           name = args[1].string;
            if (!objp) {
                error(ERROR_FATAL, "NULL object passed to aget()/hasAttr()");
            } else if (!name) {