readpixels-24_8.c:62:6: warning: taking the absolute value of unsigned type 
'unsigned int' has no effect [-Wabsolute-value]
            abs((value >> 8) - (expected >> 8)) > 1) {
            ^
readpixels-24_8.c:62:6: note: remove the call to 'abs' since unsigned values 
cannot be negative
            abs((value >> 8) - (expected >> 8)) > 1) {
            ^~~

Signed-off-by: Vinson Lee <[email protected]>
---
 tests/spec/ext_packed_depth_stencil/readpixels-24_8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/spec/ext_packed_depth_stencil/readpixels-24_8.c 
b/tests/spec/ext_packed_depth_stencil/readpixels-24_8.c
index 7fb9ad8..08288ca 100644
--- a/tests/spec/ext_packed_depth_stencil/readpixels-24_8.c
+++ b/tests/spec/ext_packed_depth_stencil/readpixels-24_8.c
@@ -59,7 +59,7 @@ test_pixel(int x, int y, uint32_t value)
 
        /* Compare depth and stencil separately. Use 1-bit tolerance for depth. 
*/
        if ((value & 0xff) - (expected & 0xff) != 0 ||
-           abs((value >> 8) - (expected >> 8)) > 1) {
+           abs((int32_t) (value >> 8) - (int32_t) (expected >> 8)) > 1) {
                fprintf(stderr,
                        "Expected 0x%08x at (%d,%d), found 0x%08x\n",
                        expected, x, y, value);
-- 
2.1.0

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to