From 11453c5fef652abfb751c6ee43b70b00b3efe6db Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 27 Aug 2022 20:18:07 -0700 Subject: [PATCH] gvpr: more tightly scope 'nextg' This squashes a -Wclobbered compiler warning. Though, as discussed in the prior commit, I believe this to be a false positive. As of this commit, Graphviz builds free of -Wclobbered warnings. Gitlab: closes #1801 --- lib/gvpr/gvpr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gvpr/gvpr.c b/lib/gvpr/gvpr.c index 8cdec77e8..6a1df2a50 100644 --- a/lib/gvpr/gvpr.c +++ b/lib/gvpr/gvpr.c @@ -936,7 +936,6 @@ static int gvpr_core(int argc, char *argv[], gvpropts *uopts, gpr_info info; int rv = 0; int cleanup, i, incoreGraphs; - Agraph_t* nextg = NULL; setErrorErrors (0); ingDisc.dflt = sfstdin; @@ -1012,6 +1011,7 @@ static int gvpr_core(int argc, char *argv[], gvpropts *uopts, gs->ing = newIng(0, gs->opts.inFiles, &ingDisc); if (gs->opts.verbose) gvstart_timer (); + Agraph_t* nextg = NULL; for (gs->state->curgraph = nextGraph(gs->ing); gs->state->curgraph; gs->state->curgraph = nextg) { if (gs->opts.verbose) fprintf(stderr, "Read graph: %.2f secs.\n", gvelapsed_sec()); -- 2.50.1