[Mesa-dev] [PATCH] mesa: typecast arguments to printf to avoid 32-bit warnings

Ilia Mirkin imirkin at alum.mit.edu
Mon Apr 4 01:57:00 UTC 2016


Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 src/mesa/main/bufferobj.c     | 3 ++-
 src/mesa/vbo/vbo_exec_array.c | 8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 731b62e..9a59043 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -3750,7 +3750,8 @@ _mesa_BindBufferRange(GLenum target, GLuint index,
 
    if (MESA_VERBOSE & VERBOSE_API) {
       _mesa_debug(ctx, "glBindBufferRange(%s, %u, %u, %ld, %ld)\n",
-                  _mesa_enum_to_string(target), index, buffer, offset, size);
+                  _mesa_enum_to_string(target), index, buffer,
+                  (long)offset, (long)size);
    }
 
    if (buffer == 0) {
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 40cf3ff..88a7b9c 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -1659,8 +1659,8 @@ vbo_exec_MultiDrawArraysIndirectCount(GLenum mode,
    if (MESA_VERBOSE & VERBOSE_DRAW)
       _mesa_debug(ctx, "glMultiDrawArraysIndirectCountARB"
                   "(%s, %lx, %lx, %i, %i)\n",
-                  _mesa_enum_to_string(mode), indirect,
-                  drawcount, maxdrawcount, stride);
+                  _mesa_enum_to_string(mode), (long)indirect,
+                  (long)drawcount, maxdrawcount, stride);
 
    /* If <stride> is zero, the array elements are treated as tightly packed. */
    if (stride == 0)
@@ -1688,8 +1688,8 @@ vbo_exec_MultiDrawElementsIndirectCount(GLenum mode, GLenum type,
       _mesa_debug(ctx, "glMultiDrawElementsIndirectCountARB"
                   "(%s, %s, %lx, %lx, %i, %i)\n",
                   _mesa_enum_to_string(mode),
-                  _mesa_enum_to_string(type), indirect,
-                  drawcount, maxdrawcount, stride);
+                  _mesa_enum_to_string(type), (long)indirect,
+                  (long)drawcount, maxdrawcount, stride);
 
    /* If <stride> is zero, the array elements are treated as tightly packed. */
    if (stride == 0)
-- 
2.7.3



More information about the mesa-dev mailing list