aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König2018-01-07 03:10:15 -0600
committerChristian König2018-01-09 10:15:13 -0600
commitde807d1a740effe60da62d07dcfeae7c01012d15 (patch)
treeee00cfc6833061ebdb1b9f9c8c37b50b1120189b
parent07ea20d5beb24315b721adf83bbfa72ce016e146 (diff)
downloadexternal-libdrm-de807d1a740effe60da62d07dcfeae7c01012d15.tar.gz
external-libdrm-de807d1a740effe60da62d07dcfeae7c01012d15.tar.xz
external-libdrm-de807d1a740effe60da62d07dcfeae7c01012d15.zip
test/amdgpu: fix compiler warnings
SWAP_32() should mask first and then shift. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r--tests/amdgpu/basic_tests.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c
index 474a679c..9c918951 100644
--- a/tests/amdgpu/basic_tests.c
+++ b/tests/amdgpu/basic_tests.c
@@ -253,10 +253,10 @@ CU_TestInfo basic_tests[] = {
253 253
254 254
255 255
256#define SWAP_32(num) ((num>>24)&0xff) | \ 256#define SWAP_32(num) (((num & 0xff000000) >> 24) | \
257 ((num<<8)&0xff0000) | \ 257 ((num & 0x0000ff00) << 8) | \
258 ((num>>8)&0xff00) | \ 258 ((num & 0x00ff0000) >> 8) | \
259 ((num<<24)&0xff000000) 259 ((num & 0x000000ff) << 24))
260 260
261 261
262/* Shader code 262/* Shader code