]> granicus.if.org Git - graphviz/commitdiff
sfdpgen: squash -Wunused warnings for 'nsuper_avg'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 14 May 2022 03:55:32 +0000 (20:55 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 14 May 2022 03:55:32 +0000 (20:55 -0700)
These are currently failing the macOS CMake build in CI.

lib/sfdpgen/spring_electrical.c

index 2c53f19ed6c312cf13316bba7b20242fb61cce66..538393f1c96283e667aa4e2fbd180b27f0113b8f 100644 (file)
@@ -1418,6 +1418,8 @@ static void spring_maxent_embedding(int dim, SparseMatrix A0, SparseMatrix D, sp
     if (Verbose) {
       fprintf(stderr, "\r                iter = %d, step = %f Fnorm = %f nsuper = %d nz = %d stress = %f                                  ",iter, step, Fnorm, (int) nsuper_avg,A->nz, stress);
     }
+#else
+    (void)nsuper_avg;
 #endif
 
     step = update_step(adaptive_cooling, step, Fnorm, Fnorm0, cool);
@@ -1604,6 +1606,8 @@ void spring_electrical_spring_embedding(int dim, SparseMatrix A0, SparseMatrix D
         fprintf(stderr, "energy = %f\n",spring_electrical_energy(dim, A, x, p, CRK, KP));
 #endif
     }
+#else
+    (void)nsuper_avg;
 #endif
 
     step = update_step(adaptive_cooling, step, Fnorm, Fnorm0, cool);