From: Matthew Fernandez Date: Thu, 10 Feb 2022 04:43:50 +0000 (+1100) Subject: sfdpgen: remove dead store of 'DistanceMatrix_restrict_matching' result X-Git-Tag: 3.0.0~36^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b9a4437bc97aa2773949e6e26a1e6633109630f7;p=graphviz sfdpgen: remove dead store of 'DistanceMatrix_restrict_matching' result The returned value is immediately overwritten after being stored. --- diff --git a/lib/sfdpgen/Multilevel.c b/lib/sfdpgen/Multilevel.c index da9b6e71b..f3112093f 100644 --- a/lib/sfdpgen/Multilevel.c +++ b/lib/sfdpgen/Multilevel.c @@ -815,12 +815,6 @@ static void maximal_independent_edge_set_heavest_edge_pernode_scaled(SparseMatri } } -static SparseMatrix DistanceMatrix_restrict_matching(int *matching, SparseMatrix D){ - if (!D) return NULL; - assert(0);/* not yet implemented! */ - return NULL; -} - static SparseMatrix DistanceMatrix_restrict_filtering(int *mask, int is_C, int is_F, SparseMatrix D){ /* max independent vtx set based coarsening. Coarsen nodes has mask >= is_C. Fine nodes == is_F. */ if (!D) return NULL; @@ -1008,8 +1002,7 @@ static void Multilevel_coarsen_internal(SparseMatrix A, SparseMatrix *cA, Sparse *cA = SparseMatrix_remove_diagonal(*cA); - *cD = DistanceMatrix_restrict_matching(matching, D); - *cD=NULL; + *cD = NULL; break; case COARSEN_INDEPENDENT_VERTEX_SET: