checkasm: Cast unsigned to signed

Avoid a warning for passing an unsigned value to abs(), some compilers
might optimize away abs().
pull/244/merge
Luca Barbato 9 years ago
parent b183abfb5b
commit 40ad05bab2
  1. 2
      tests/checkasm/checkasm.c

@ -190,7 +190,7 @@ int float_near_ulp(float a, float b, unsigned max_ulp)
return a == b;
}
if (abs(x.i - y.i) <= max_ulp)
if (llabs((int64_t)x.i - y.i) <= max_ulp)
return 1;
return 0;

Loading…
Cancel
Save