Module: libav
Branch: master
Commit: 40ad05bab206c932a32171d45581080c914b06ec

Author:    Luca Barbato <[email protected]>
Committer: Luca Barbato <[email protected]>
Date:      Tue Jul 19 05:26:33 2016 +0200

checkasm: Cast unsigned to signed

Avoid a warning for passing an unsigned value to abs(), some compilers
might optimize away abs().

---

 tests/checkasm/checkasm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
index b062197..34f49c0 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;

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to