]> granicus.if.org Git - graphviz/commitdiff
squash -Wshadow warning in Import_coord_clusters_from_dot
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Apr 2021 04:05:37 +0000 (21:05 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 14 May 2021 00:03:36 +0000 (17:03 -0700)
Similar to a prior change, there was a nested variable also called sz. By
removing this sz, we not only squash a compiler warning but make the code more
readable.

lib/sparse/DotIO.c

index 3be1df79c97a3888ef06dd06f32663369eb57382..7425b1c2026df861b7625d6afbfe7d9effce38c0 100644 (file)
@@ -734,7 +734,6 @@ SparseMatrix Import_coord_clusters_from_dot(Agraph_t* g, int maxcluster, int dim
   real* val;
   real v;
   int type = MATRIX_TYPE_REAL;
-  size_t sz = sizeof(real);
   char scluster[100];
   float ff;
 
@@ -819,7 +818,8 @@ SparseMatrix Import_coord_clusters_from_dot(Agraph_t* g, int maxcluster, int dim
       i++;
     }
   }
-  A = SparseMatrix_from_coordinate_arrays(nedges, nnodes, nnodes, I, J, val, type, sz);
+  A = SparseMatrix_from_coordinate_arrays(nedges, nnodes, nnodes, I, J, val,
+                                          type, sizeof(real));
 
   /* get clustering info */
   *clusters = MALLOC(sizeof(int)*nnodes);