On 2016-07-19 05:29:25 +0200, Luca Barbato wrote:
> Avoid a warning for passing an unsigned value to abs().

I guess it's more than a warning since $evil optimizer just could 
optimize it away.

> ---
>  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;

ok

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

Reply via email to