Reviewed-by: Laura Ekstrand <[email protected]>

On Tue, Mar 3, 2015 at 6:07 PM, Vinson Lee <[email protected]> wrote:

> getcompressedtextureimage.c:121:7: warning: using floating point absolute
> value function 'fabs' when argument is of integer type [-Wabsolute-value]
>                 if (fabs((int)data[i] - (int)expected[i]) > tolerance) {
>                     ^
> getcompressedtextureimage.c:121:7: note: use function 'abs' instead
>                 if (fabs((int)data[i] - (int)expected[i]) > tolerance) {
>                     ^~~~
>                     abs
>
> Signed-off-by: Vinson Lee <[email protected]>
> ---
>  tests/spec/arb_direct_state_access/getcompressedtextureimage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
> a/tests/spec/arb_direct_state_access/getcompressedtextureimage.c
> b/tests/spec/arb_direct_state_access/getcompressedtextureimage.c
> index 9546af5..84aa30b 100644
> --- a/tests/spec/arb_direct_state_access/getcompressedtextureimage.c
> +++ b/tests/spec/arb_direct_state_access/getcompressedtextureimage.c
> @@ -118,7 +118,7 @@ compare_layer(int layer, int num_elements, int
> tolerance,
>         int i;
>
>         for (i = 0; i < num_elements; ++i) {
> -               if (fabs((int)data[i] - (int)expected[i]) > tolerance) {
> +               if (abs((int)data[i] - (int)expected[i]) > tolerance) {
>                         printf("GetCompressedTextureImage() returns
> incorrect"
>                                " data in byte %i for layer %i\n",
>                                i, layer);
> --
> 2.3.1
>
> _______________________________________________
> Piglit mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to