From: Matthew Fernandez Date: Wed, 28 Dec 2022 18:07:02 +0000 (-0800) Subject: common attach_attrs_and_arrows: remove shadowing of 'i' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6bd6e866e2cc5369a2a3256f0cb271e6268023f4;p=graphviz common attach_attrs_and_arrows: remove shadowing of 'i' --- diff --git a/lib/common/output.c b/lib/common/output.c index a64c6d72c..6425d32e0 100644 --- a/lib/common/output.c +++ b/lib/common/output.c @@ -229,7 +229,7 @@ void attach_attrs_and_arrows(graph_t* g, int* sp, int* ep) { int e_arrows; /* graph has edges with end arrows */ int s_arrows; /* graph has edges with start arrows */ - int i, j, sides; + int j, sides; char buf[BUFSIZ]; /* Used only for small strings */ char xbuffer[BUFSIZ]; /* Initial buffer for xb */ agxbuf xb; @@ -296,7 +296,6 @@ void attach_attrs_and_arrows(graph_t* g, int* sp, int* ep) agset(n, "rects", agxbuse(&xb)); } else { polygon_t *poly; - int i; if (N_vertices && isPolygon(n)) { poly = ND_shape_info(n); sides = poly->sides; @@ -309,7 +308,7 @@ void attach_attrs_and_arrows(graph_t* g, int* sp, int* ep) if (sides < 3) sides = 8; } - for (i = 0; i < sides; i++) { + for (int i = 0; i < sides; i++) { if (i > 0) agxbputc(&xb, ' '); if (poly->sides >= 3) @@ -330,7 +329,7 @@ void attach_attrs_and_arrows(graph_t* g, int* sp, int* ep) continue; if (ED_spl(e) == NULL) continue; /* reported in postproc */ - for (i = 0; i < ED_spl(e)->size; i++) { + for (int i = 0; i < ED_spl(e)->size; i++) { if (i > 0) agxbputc(&xb, ';'); if (ED_spl(e)->list[i].sflag) {