diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2016-07-19 06:26:33 +0300 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2016-07-23 09:27:32 +0300 |
commit | 40ad05bab206c932a32171d45581080c914b06ec (patch) | |
tree | c9f886c5e31b279f265c3f915f04217390ca2fd7 /tests | |
parent | b183abfb5b6366b177cf44f244c66156257a6fd6 (diff) |
checkasm: Cast unsigned to signed
Avoid a warning for passing an unsigned value to abs(), some compilers
might optimize away abs().
Diffstat (limited to 'tests')
-rw-r--r-- | tests/checkasm/checkasm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index b0621973a6..34f49c0b37 100644 --- a/tests/checkasm/checkasm.c +++ b/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; |