[Mesa-dev] [PATCH] main: uses casts to silence some _mesa_debug() format warnings
Sinclair Yeh
syeh at vmware.com
Wed May 4 16:05:41 UTC 2016
Reviewed-by: Sinclair Yeh <syeh at vmware.com>
On Mon, May 02, 2016 at 07:15:11PM -0600, Brian Paul wrote:
> Silences warnings with 32-bit Linux gcc builds and MinGW which doesn't
> recognize the âtâ conversion character.
> ---
> src/mesa/main/bufferobj.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> index 731b62e..e60a8ea 100644
> --- a/src/mesa/main/bufferobj.c
> +++ b/src/mesa/main/bufferobj.c
> @@ -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) {
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list