diff options
author | Eric Anholt <[email protected]> | 2010-09-01 14:46:22 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-09-01 17:08:23 -0700 |
commit | 86af037e6a1643284f87c5e01c3fcb09dd07bf35 (patch) | |
tree | 6f6fa58ff73a01d6da27ffcab37ad96aaebae28e /src/mesa/main/bufferobj.c | |
parent | 3cddc15d9dcf44a0998dd5f29ae6f6d17370584e (diff) |
mesa: Fix many printf-like warnings.
Most of these are just typecasting to long to match the arg type. I
don't really care too much about getting a GLsizei or whatever
appropriate type in. However, there were a number of real bugs, like
missing arguments or passing floats to integer format specifiers. My
favorite: printflike("%s, argument") is missing an argument.
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 4e232b5731f..895ce76e4b7 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -590,7 +590,7 @@ bind_buffer_object(GLcontext *ctx, GLenum target, GLuint buffer) bindTarget = get_buffer_target(ctx, target); if (!bindTarget) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBindBufferARB(target 0x%x)"); + _mesa_error(ctx, GL_INVALID_ENUM, "glBindBufferARB(target 0x%x)", target); return; } @@ -1566,14 +1566,14 @@ _mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget, if (readOffset + size > src->Size) { _mesa_error(ctx, GL_INVALID_VALUE, "glCopyBuffserSubData(readOffset + size = %d)", - readOffset, size); + readOffset + size); return; } if (writeOffset + size > dst->Size) { _mesa_error(ctx, GL_INVALID_VALUE, "glCopyBuffserSubData(writeOffset + size = %d)", - writeOffset, size); + writeOffset + size); return; } @@ -1617,13 +1617,13 @@ _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, if (offset < 0) { _mesa_error(ctx, GL_INVALID_VALUE, - "glMapBufferRange(offset = %ld)", offset); + "glMapBufferRange(offset = %ld)", (long)offset); return NULL; } if (length < 0) { _mesa_error(ctx, GL_INVALID_VALUE, - "glMapBufferRange(length = %ld)", length); + "glMapBufferRange(length = %ld)", (long)length); return NULL; } @@ -1708,13 +1708,13 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) if (offset < 0) { _mesa_error(ctx, GL_INVALID_VALUE, - "glMapBufferRange(offset = %ld)", offset); + "glMapBufferRange(offset = %ld)", (long)offset); return; } if (length < 0) { _mesa_error(ctx, GL_INVALID_VALUE, - "glMapBufferRange(length = %ld)", length); + "glMapBufferRange(length = %ld)", (long)length); return; } @@ -1746,8 +1746,8 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) if (offset + length > bufObj->Length) { _mesa_error(ctx, GL_INVALID_VALUE, - "glMapBufferRange(offset %ld + length %ld > mapped length %ld)", - offset, length, bufObj->Length); + "glMapBufferRange(offset %ld + length %ld > mapped length %ld)", + (long)offset, (long)length, (long)bufObj->Length); return; } |