]> granicus.if.org Git - graphviz/commitdiff
Remove 2 -Wunused-but-set-variable warnings in DotIO.c
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 7 Nov 2020 13:14:04 +0000 (14:14 +0100)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 21 Nov 2020 08:12:33 +0000 (09:12 +0100)
lib/sparse/DotIO.c

index 1b1716dd4090aaac2c6158295d80246f5c10c056..f1ab9088134be622dcb26b89592cf9ee835f7713 100644 (file)
@@ -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);