From: Matthew Fernandez Date: Sat, 14 May 2022 00:01:26 +0000 (-0700) Subject: mingle: remove unused 'len_total' in 'pedge_export_gv' X-Git-Tag: 4.0.0~40^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5409ca61130f4b2373049f63b21024320a207ba;p=graphviz mingle: remove unused 'len_total' in 'pedge_export_gv' The CMake macOS CI job has begun erroring out: …/lib/mingle/edge_bundling.cpp:208:27: error: variable 'len_total' set but not used [-Werror,-Wunused-but-set-variable] double maxwgt = 0, len, len_total, len_total0; ^ While the error is accurate, nothing has changed on our side that would have caused this. I can only assume Gitlab have upgraded the macOS runners to pull in a new version of Clang. --- diff --git a/lib/mingle/edge_bundling.cpp b/lib/mingle/edge_bundling.cpp index fe3b9b3ca..afa2c64fa 100644 --- a/lib/mingle/edge_bundling.cpp +++ b/lib/mingle/edge_bundling.cpp @@ -205,7 +205,7 @@ void pedge_export_gv(FILE *fp, int ne, pedge *edges){ pedge edge; double *x, t; int i, j, k, kk, dim, sta, sto; - double maxwgt = 0, len, len_total, len_total0; + double maxwgt = 0, len, len_total0; int r, g, b; double tt1[3]={0.15,0.5,0.85}; double tt2[4]={0.15,0.4,0.6,0.85}; @@ -289,7 +289,6 @@ void pedge_export_gv(FILE *fp, int ne, pedge *edges){ fprintf(fp, "%f", edge->wgts[j]); } - len_total = 0; len_total0 = 0; fprintf(fp, "\", color=\""); for (j = 0; j < edge->npoints - 1; j++){ @@ -306,7 +305,6 @@ void pedge_export_gv(FILE *fp, int ne, pedge *edges){ len += (edge->x[dim*j+k] - edge->x[dim*(j+1)+k])*(edge->x[dim*j+k] - edge->x[dim*(j+1)+k]); } len = sqrt(len/k); - len_total += len; t = edge->wgts[j]/maxwgt; /* interpotate between red (t = 1) to blue (t = 0) */ r = 255*t; g = 0; b = 255*(1-t); b = 255*(1-t);