From 7e85b0a025a82c3ffed060a757a3b4adae03d269 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 23 Jan 2007 12:50:08 -0700 Subject: silence C++ warnings --- src/mesa/swrast/s_stencil.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/mesa/swrast/s_stencil.c') diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index dbab6b3c20b..a8aa1d4b6dc 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -1062,7 +1062,8 @@ void _swrast_read_stencil_span(GLcontext *ctx, struct gl_renderbuffer *rb, GLint n, GLint x, GLint y, GLstencil stencil[]) { - if (y < 0 || y >= rb->Height || x + n <= 0 || x >= rb->Width) { + if (y < 0 || y >= (GLint) rb->Height || + x + n <= 0 || x >= (GLint) rb->Width) { /* span is completely outside framebuffer */ return; /* undefined values OK */ } @@ -1073,7 +1074,7 @@ _swrast_read_stencil_span(GLcontext *ctx, struct gl_renderbuffer *rb, n -= dx; stencil += dx; } - if (x + n > rb->Width) { + if (x + n > (GLint) rb->Width) { GLint dx = x + n - rb->Width; n -= dx; } @@ -1103,7 +1104,8 @@ _swrast_write_stencil_span(GLcontext *ctx, GLint n, GLint x, GLint y, const GLuint stencilMax = (1 << fb->Visual.stencilBits) - 1; const GLuint stencilMask = ctx->Stencil.WriteMask[0]; - if (y < 0 || y >= rb->Height || x + n <= 0 || x >= rb->Width) { + if (y < 0 || y >= (GLint) rb->Height || + x + n <= 0 || x >= (GLint) rb->Width) { /* span is completely outside framebuffer */ return; /* undefined values OK */ } @@ -1113,7 +1115,7 @@ _swrast_write_stencil_span(GLcontext *ctx, GLint n, GLint x, GLint y, n -= dx; stencil += dx; } - if (x + n > rb->Width) { + if (x + n > (GLint) rb->Width) { GLint dx = x + n - rb->Width; n -= dx; } @@ -1191,7 +1193,7 @@ _swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb ) } else { /* no bit masking */ - if (width == rb->Width && rb->DataType == GL_UNSIGNED_BYTE) { + if (width == (GLint) rb->Width && rb->DataType == GL_UNSIGNED_BYTE) { /* optimized case */ /* Note: bottom-to-top raster assumed! */ GLubyte *stencil = (GLubyte *) rb->GetPointer(ctx, rb, x, y); -- cgit v1.2.3