i965g: Fix printf format warning on 32-bit platforms.
authorVinson Lee <vlee@vmware.com>
Sun, 22 Aug 2010 04:27:43 +0000 (21:27 -0700)
committerVinson Lee <vlee@vmware.com>
Sun, 22 Aug 2010 04:27:43 +0000 (21:27 -0700)
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

index 8b3f46f2c1632cf4b288d0e2ca4f6a1994464c8d..e80067f3b191830d72bc67335688a5f33c61cb82 100644 (file)
@@ -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;
    }