main: uses casts to silence some _mesa_debug() format warnings
authorBrian Paul <brianp@vmware.com>
Tue, 3 May 2016 01:10:06 +0000 (19:10 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 4 May 2016 20:49:39 +0000 (14:49 -0600)
Silences warnings with 32-bit Linux gcc builds and MinGW which doesn't
recognize the â€˜t’ conversion character.

Reviewed-by: Sinclair Yeh <syeh@vmware.com>
src/mesa/main/bufferobj.c

index 731b62ebe21dbeb03e49ef25986149cc91424e7c..e60a8ea523751d9c2d48d9d3964dba0af3a6ec4d 100644 (file)
@@ -2487,8 +2487,9 @@ _mesa_map_buffer_range(struct gl_context *ctx,
 
    if (offset + length > bufObj->Size) {
       _mesa_error(ctx, GL_INVALID_VALUE,
-                  "%s(offset %td + length %td > buffer_size %td)", func,
-                  offset, length, bufObj->Size);
+                  "%s(offset %lu + length %lu > buffer_size %lu)", func,
+                  (unsigned long) offset, (unsigned long) length,
+                  (unsigned long) bufObj->Size);
       return NULL;
    }
 
@@ -3749,8 +3750,9 @@ _mesa_BindBufferRange(GLenum target, GLuint index,
    struct gl_buffer_object *bufObj;
 
    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_debug(ctx, "glBindBufferRange(%s, %u, %u, %lu, %lu)\n",
+                  _mesa_enum_to_string(target), index, buffer,
+                  (unsigned long) offset, (unsigned long) size);
    }
 
    if (buffer == 0) {