summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-04-05 03:05:17 +0000
committerBrian Paul <[email protected]>2006-04-05 03:05:17 +0000
commit28b014ee256290eb0494b967e40c475c0c895f57 (patch)
tree9196b0a5fc1fbdd151ac80335e0517771c960998 /src/mesa/main
parent027bb77e02cf38c553d1396a348783ddc1b7913c (diff)
Silence minor compiler warnings (-Wextra).
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/buffers.c7
-rw-r--r--src/mesa/main/buffers.h2
-rw-r--r--src/mesa/main/depthstencil.c6
-rw-r--r--src/mesa/main/fbobject.c9
-rw-r--r--src/mesa/main/framebuffer.c2
-rw-r--r--src/mesa/main/matrix.c4
6 files changed, 20 insertions, 10 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 0d5d838ca0c..28fbc34ff78 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -193,10 +193,10 @@ static GLbitfield
supported_buffer_bitmask(const GLcontext *ctx, GLuint framebufferID)
{
GLbitfield mask = 0x0;
- GLint i;
if (framebufferID > 0) {
/* A user-created renderbuffer */
+ GLuint i;
ASSERT(ctx->Extensions.EXT_framebuffer_object);
for (i = 0; i < ctx->Const.MaxColorAttachments; i++) {
mask |= (BUFFER_BIT_COLOR0 << i);
@@ -204,6 +204,7 @@ supported_buffer_bitmask(const GLcontext *ctx, GLuint framebufferID)
}
else {
/* A window system renderbuffer */
+ GLint i;
mask = BUFFER_BIT_FRONT_LEFT; /* always have this */
if (ctx->Visual.stereoMode) {
mask |= BUFFER_BIT_FRONT_RIGHT;
@@ -485,11 +486,11 @@ set_color_output(GLcontext *ctx, GLuint output, GLenum buffer,
* BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT).
*/
void
-_mesa_drawbuffers(GLcontext *ctx, GLsizei n, const GLenum *buffers,
+_mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
const GLbitfield *destMask)
{
GLbitfield mask[MAX_DRAW_BUFFERS];
- GLint output;
+ GLuint output;
if (!destMask) {
/* compute destMask values now */
diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h
index 77e9f81560e..b61bdad4330 100644
--- a/src/mesa/main/buffers.h
+++ b/src/mesa/main/buffers.h
@@ -53,7 +53,7 @@ extern void GLAPIENTRY
_mesa_DrawBuffersARB(GLsizei n, const GLenum *buffers);
extern void
-_mesa_drawbuffers(GLcontext *ctx, GLsizei n, const GLenum *buffers,
+_mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
const GLbitfield *destMask);
extern void GLAPIENTRY
diff --git a/src/mesa/main/depthstencil.c b/src/mesa/main/depthstencil.c
index 09524bba02e..d4990bb795f 100644
--- a/src/mesa/main/depthstencil.c
+++ b/src/mesa/main/depthstencil.c
@@ -48,6 +48,10 @@
static void *
nop_get_pointer(GLcontext *ctx, struct gl_renderbuffer *rb, GLint x, GLint y)
{
+ (void) ctx;
+ (void) rb;
+ (void) x;
+ (void) y;
return NULL;
}
@@ -82,6 +86,8 @@ alloc_wrapper_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
struct gl_renderbuffer *dsrb = rb->Wrapped;
GLboolean retVal;
+ (void) internalFormat;
+
ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
retVal = dsrb->AllocStorage(ctx, dsrb, dsrb->InternalFormat, width, height);
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 191b81c39c6..d3d2f84401b 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -410,6 +410,7 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
GLenum intFormat = GL_NONE;
GLuint w = 0, h = 0;
GLint i;
+ GLuint j;
assert(fb->Name != 0);
@@ -498,14 +499,14 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
}
/* Check that all DrawBuffers are present */
- for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
- if (fb->ColorDrawBuffer[i] != GL_NONE) {
+ for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
+ if (fb->ColorDrawBuffer[j] != GL_NONE) {
const struct gl_renderbuffer_attachment *att
- = _mesa_get_attachment(ctx, fb, fb->ColorDrawBuffer[i]);
+ = _mesa_get_attachment(ctx, fb, fb->ColorDrawBuffer[j]);
assert(att);
if (att->Type == GL_NONE) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT;
- fbo_incomplete("missing drawbuffer", i);
+ fbo_incomplete("missing drawbuffer", j);
return;
}
}
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index a6607387fee..7ce84131e63 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -141,6 +141,7 @@ struct gl_framebuffer *
_mesa_new_framebuffer(GLcontext *ctx, GLuint name)
{
struct gl_framebuffer *fb;
+ (void) ctx;
assert(name != 0);
fb = CALLOC_STRUCT(gl_framebuffer);
if (fb) {
@@ -581,6 +582,7 @@ update_color_draw_buffers(GLcontext *ctx, struct gl_framebuffer *fb)
static void
update_color_read_buffer(GLcontext *ctx, struct gl_framebuffer *fb)
{
+ (void) ctx;
if (fb->_ColorReadBufferIndex == -1) {
fb->_ColorReadBuffer = NULL; /* legal! */
}
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c
index ecd3732c933..5ff250a0c79 100644
--- a/src/mesa/main/matrix.c
+++ b/src/mesa/main/matrix.c
@@ -576,8 +576,8 @@ _mesa_set_viewport( GLcontext *ctx, GLint x, GLint y,
}
/* clamp width and height to the implementation dependent range */
- width = CLAMP(width, 1, ctx->Const.MaxViewportWidth);
- height = CLAMP(height, 1, ctx->Const.MaxViewportHeight);
+ width = CLAMP(width, 1, (GLsizei) ctx->Const.MaxViewportWidth);
+ height = CLAMP(height, 1, (GLsizei) ctx->Const.MaxViewportHeight);
ctx->Viewport.X = x;
ctx->Viewport.Width = width;