From f8fa0225f0f9e26f50dd50d0aa46adafbb38548f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 23 Apr 2021 21:27:15 -0700 Subject: [PATCH] remove dead writes to buf It's unclear what the intention of this code was. It writes data to buf that is then never read. --- lib/sparse/DotIO.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/sparse/DotIO.c b/lib/sparse/DotIO.c index 57d924964..100ea2846 100644 --- a/lib/sparse/DotIO.c +++ b/lib/sparse/DotIO.c @@ -540,17 +540,6 @@ makeDotGraph (SparseMatrix A, char *name, int dim, real *x, int with_color, int for (j = ia[i]; j < ia[i+1]; j++) { h = arr [ja[j]]; if (val){ - switch (A->type){ - case MATRIX_TYPE_REAL: - snprintf(buf, sizeof(buf), "%f", ((real*)A->a)[j]); - break; - case MATRIX_TYPE_INTEGER: - snprintf(buf, sizeof(buf), "%d", ((int*)A->a)[j]); - break; - case MATRIX_TYPE_COMPLEX:/* take real part as weight */ - snprintf(buf, sizeof(buf), "%f", ((real*)A->a)[2*j]); - break; - } if (with_color) { if (i != ja[j]){ snprintf(buf2, sizeof(buf2), "%s", hue2rgb(.65*color[j], cstring)); @@ -559,7 +548,6 @@ makeDotGraph (SparseMatrix A, char *name, int dim, real *x, int with_color, int } } } else { - snprintf(buf, sizeof(buf), "%f", 1.); if (with_color) { if (i != ja[j]){ snprintf(buf2, sizeof(buf2), "%s", hue2rgb(.65*color[j], cstring)); -- 2.50.1