[Mesa-dev] [PATCH] graw: Silence printf format warnings in 32-bit builds.
Paul Berry
stereotype441 at gmail.com
Mon Feb 27 13:12:30 PST 2012
On 25 February 2012 14:03, Vinson Lee <vlee at freedesktop.org> wrote:
> 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
>
>
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120227/05f7a6b9/attachment.html>
More information about the mesa-dev
mailing list