From 5a253b18bece3fa4918772f8f2e517a24ea29562 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sat, 7 Nov 2020 14:14:04 +0100 Subject: [PATCH] Remove 2 -Wunused-but-set-variable warnings in DotIO.c --- lib/sparse/DotIO.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/sparse/DotIO.c b/lib/sparse/DotIO.c index 1b1716dd4..f1ab90881 100644 --- a/lib/sparse/DotIO.c +++ b/lib/sparse/DotIO.c @@ -462,7 +462,7 @@ makeDotGraph (SparseMatrix A, char *name, int dim, real *x, int with_color, int Agedge_t* e; int i, j; char buf[1024], buf2[1024]; - Agsym_t *sym, *sym2 = NULL, *sym3 = NULL; + Agsym_t *sym2 = NULL, *sym3 = NULL; int* ia=A->ia; int* ja=A->ja; real* val = (real*)(A->a); @@ -496,10 +496,10 @@ makeDotGraph (SparseMatrix A, char *name, int dim, real *x, int with_color, int label_string = strcat(label_string, " edges."); - if (with_label) sym = agattr(g, AGRAPH, "label", label_string); - sym = agattr(g, AGRAPH, "fontcolor", "#808090"); - if (with_color) sym = agattr(g, AGRAPH, "bgcolor", "black"); - sym = agattr(g, AGRAPH, "outputorder", "edgesfirst"); + if (with_label) agattr(g, AGRAPH, "label", label_string); + agattr(g, AGRAPH, "fontcolor", "#808090"); + if (with_color) agattr(g, AGRAPH, "bgcolor", "black"); + agattr(g, AGRAPH, "outputorder", "edgesfirst"); if (A->m > 100) { /* -Estyle=setlinewidth(0.0)' -Eheadclip=false -Etailclip=false -Nstyle=invis*/ @@ -673,7 +673,6 @@ Agraph_t *convert_edge_labels_to_nodes(Agraph_t* g){ Agraph_t *dg; int nnodes; - int nedges; Agedge_t *ep, *e; @@ -688,7 +687,6 @@ Agraph_t *convert_edge_labels_to_nodes(Agraph_t* g){ dg = agopen("test", g->desc, 0); nnodes = agnnodes (g); - nedges = agnedges (g); ndmap = malloc(sizeof(Agnode_t *)*nnodes); -- 2.40.0