From b00d0d9d7f6f7387560797991a2b9bbdb9b80d39 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 23 Apr 2021 21:00:24 -0700 Subject: [PATCH] squash a -Wshadow warning in SparseMatrix_import_dot By moving sz closer to its use location it is moved passed a nested declaration of a different variable also called sz. --- lib/sparse/DotIO.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sparse/DotIO.c b/lib/sparse/DotIO.c index 59cb331a7..a7d929603 100644 --- a/lib/sparse/DotIO.c +++ b/lib/sparse/DotIO.c @@ -103,7 +103,6 @@ SparseMatrix_import_dot (Agraph_t* g, int dim, real **label_sizes, real **x, int real *val, *valD = NULL; real v; int type = MATRIX_TYPE_REAL; - size_t sz = sizeof(real); real padding = 10; int nedge_nodes = 0; @@ -261,6 +260,7 @@ SparseMatrix_import_dot (Agraph_t* g, int dim, real **label_sizes, real **x, int else if (x) agerr (AGERR, "Error: graph %s has missing \"pos\" information", agnameof(g)); + size_t sz = sizeof(real); if (format == FORMAT_CSR) A = SparseMatrix_from_coordinate_arrays(nedges, nnodes, nnodes, I, J, val, type, sz); if (edge_label_nodes) *n_edge_label_nodes = nedge_nodes; -- 2.40.0