pastix-5.2.2.22-isnan-floating-point-cast.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. Add missing cast to floating-point type:
  2. * sopalin/src/variable_csc.c: In function ‘vcsc_add_node’:
  3. * sopalin/src/variable_csc.c:138:13: error: non-floating-point argument in call to function ‘__builtin_isnan’
  4. * if (isnan(vcsc->values[COL-1][i*dof2 + ii])) {
  5. See also:
  6. https://bugs.gentoo.org/show_bug.cgi?id=580422
  7. --- src/common/src/errors.h
  8. +++ src/common/src/errors.h
  9. @@ -140,7 +140,7 @@
  10. * expr - The value to check.
  11. */
  12. #define CHECK_NAN(expr) { \
  13. - ASSERT_DEBUG(!isnan(expr), DBG_SOPALIN_NAN); \
  14. + ASSERT_DEBUG(!isnan(((double) expr)), DBG_SOPALIN_NAN); \
  15. ASSERT_DEBUG(!isinf(expr), DBG_SOPALIN_INF); \
  16. }
  17. #else
  18. --- src/sopalin/src/variable_csc.c
  19. +++ src/sopalin/src/variable_csc.c
  20. @@ -135,7 +135,7 @@
  21. #endif
  22. for (ii = 0; ii < dof2; ii++) {
  23. - if (isnan(vcsc->values[COL-1][i*dof2 + ii])) {
  24. + if (isnan(((double) vcsc->values[COL-1][i*dof2 + ii]))) {
  25. vcsc->values[COL-1][i*dof2 + ii] = VALUE[ii];
  26. } else {
  27. vcsc->values[COL-1][i*dof2 + ii] = op(vcsc->values[COL-1][i*dof2 + ii],
  28. @@ -252,7 +252,7 @@
  29. vcsc->rows[COL_NODE][i]);
  30. }
  31. #endif
  32. - if (isnan(vcsc->values[COL_NODE][idx])) {
  33. + if (isnan(((double) vcsc->values[COL_NODE][idx]))) {
  34. vcsc->values[COL_NODE][idx] = VALUE;
  35. } else {
  36. vcsc->values[COL_NODE][idx] = op(vcsc->values[COL_NODE][idx],
  37. @@ -660,7 +660,7 @@
  38. } else {
  39. INTS iterdof;
  40. for (iterdof = 0; iterdof < dof2; iterdof++) {
  41. - if (!isnan(vcsc->values[MYCOL-1][dof2*iter2+iterdof])) {
  42. + if (!isnan(((double) vcsc->values[MYCOL-1][dof2*iter2+iterdof]))) {
  43. /* ignore NaN values from VCSC */
  44. (*values_o)[dof2*iter3+iterdof] = op(
  45. (*values_o)[dof2*iter3+iterdof],