Mesa (master): i965g: Fix printf format warning on 32-bit platforms.

Vinson Lee vlee at kemper.freedesktop.org
Sun Aug 22 04:30:42 UTC 2010


Module: Mesa
Branch: master
Commit: 973c065abef2ab4066cd3c1cf12652c1da289210
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=973c065abef2ab4066cd3c1cf12652c1da289210

Author: Vinson Lee <vlee at vmware.com>
Date:   Sat Aug 21 21:27:43 2010 -0700

i965g: Fix printf format warning on 32-bit platforms.

Fixes the following GCC warning on 32-bit platforms.
warning: format '%li' expects type 'long int', but argument 4 has type 'int'

---

 src/gallium/drivers/i965/brw_batchbuffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/i965/brw_batchbuffer.c b/src/gallium/drivers/i965/brw_batchbuffer.c
index 8b3f46f..e80067f 100644
--- a/src/gallium/drivers/i965/brw_batchbuffer.c
+++ b/src/gallium/drivers/i965/brw_batchbuffer.c
@@ -162,7 +162,7 @@ brw_batchbuffer_emit_reloc(struct brw_batchbuffer *batch,
 
    if (batch->ptr - batch->map > batch->buf->size) {
       debug_printf("bad relocation ptr %p map %p offset %li size %i\n",
-		   batch->ptr, batch->map, batch->ptr - batch->map, batch->buf->size);
+		   batch->ptr, batch->map, (long) (batch->ptr - batch->map), batch->buf->size);
 
       return PIPE_ERROR_OUT_OF_MEMORY;
    }




More information about the mesa-commit mailing list