]> granicus.if.org Git - graphviz/commitdiff
squash a -Wabsolute-value warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 17 Oct 2020 21:21:49 +0000 (14:21 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Oct 2020 02:16:10 +0000 (19:16 -0700)
In 8414e62738bf7f52596eb83049ecef758582c760 I misread the surrounding code and
thought this was a float being operated on here.

lib/sparse/SparseMatrix.c

index 8bdf9da6431f582dfbe7a349123637cca0588f45..ac68b36a4caafeb3792a350176ae76a27a07b878 100644 (file)
@@ -2445,7 +2445,7 @@ SparseMatrix SparseMatrix_crop(SparseMatrix A, real epsilon){
     int *a = (int*) A->a;
     for (i = 0; i < A->m; i++){
       for (j = sta; j < ia[i+1]; j++){
-       if (fabs(a[j]) > epsilon){
+       if (abs(a[j]) > epsilon){
          ja[nz] = ja[j];
          a[nz++] = a[j];
        }