[Mesa-dev] [PATCH] graw: Silence printf format warnings in 32-bit builds.

Vinson Lee vlee at freedesktop.org
Sat Feb 25 14:03:23 PST 2012


Fixes these GCC warnings.
occlusion-query.c: In function ‘draw’:
occlusion-query.c:189: warning: format ‘%lu’ expects type ‘long unsigned
int’, but argument 2 has type ‘uint64_t’
occlusion-query.c:189: warning: format ‘%lu’ expects type ‘long unsigned
int’, but argument 3 has type ‘uint64_t’
occlusion-query.c:189: warning: format ‘%lu’ expects type ‘long unsigned
int’, but argument 2 has type ‘uint64_t’
occlusion-query.c:189: warning: format ‘%lu’ expects type ‘long unsigned
int’, but argument 3 has type ‘uint64_t’

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/gallium/tests/graw/occlusion-query.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/tests/graw/occlusion-query.c b/src/gallium/tests/graw/occlusion-query.c
index 5c4bc8c..13285c4 100644
--- a/src/gallium/tests/graw/occlusion-query.c
+++ b/src/gallium/tests/graw/occlusion-query.c
@@ -186,7 +186,8 @@ draw(void)
    info.ctx->get_query_result(info.ctx, q1, TRUE, &res1);
    info.ctx->get_query_result(info.ctx, q2, TRUE, &res2);
 
-   printf("result1 = %lu  result2 = %lu\n", res1, res2);
+   printf("result1 = %llu  result2 = %llu\n",
+          (long long unsigned) res1, (long long unsigned) res2);
    if (res1 < expected1_min || res1 > expected1_max)
       printf("  Failure: result1 should be near %d\n", expected1);
    if (res2 < expected2_min || res2 > expected2_max)
-- 
1.7.8.4



More information about the mesa-dev mailing list