summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/api_arrayelt.c4
-rw-r--r--src/mesa/main/buffers.c8
-rw-r--r--src/mesa/main/context.c4
-rw-r--r--src/mesa/main/enable.c4
-rw-r--r--src/mesa/main/texstate.c10
5 files changed, 14 insertions, 16 deletions
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index a0b7f155996..acca5701a53 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -1,4 +1,4 @@
-/* $Id: api_arrayelt.c,v 1.7 2002/04/09 16:56:50 keithw Exp $ */
+/* $Id: api_arrayelt.c,v 1.8 2002/04/19 00:23:08 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -275,7 +275,7 @@ static void _ae_update_state( GLcontext *ctx )
AEcontext *actx = AE_CONTEXT(ctx);
AEtexarray *ta = actx->texarrays;
AEarray *aa = actx->arrays;
- int i;
+ GLuint i;
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
if (ctx->Array.TexCoord[i].Enabled) {
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index be793417d48..e1706c32553 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -1,4 +1,4 @@
-/* $Id: buffers.c,v 1.33 2002/03/16 00:53:15 brianp Exp $ */
+/* $Id: buffers.c,v 1.34 2002/04/19 00:23:08 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -373,8 +373,7 @@ _mesa_ResizeBuffersMESA( void )
(*ctx->Driver.GetBufferSize)( buffer, &buf_width, &buf_height );
/* see if size of device driver's color buffer (window) has changed */
- if (buffer->Width == (GLint) buf_width &&
- buffer->Height == (GLint) buf_height)
+ if (buffer->Width == buf_width && buffer->Height == buf_height)
return; /* size is as expected */
buffer->Width = buf_width;
@@ -391,8 +390,7 @@ _mesa_ResizeBuffersMESA( void )
(*ctx->Driver.GetBufferSize)( buffer, &buf_width, &buf_height );
/* see if size of device driver's color buffer (window) has changed */
- if (buffer->Width == (GLint) buf_width &&
- buffer->Height == (GLint) buf_height)
+ if (buffer->Width == buf_width && buffer->Height == buf_height)
return; /* size is as expected */
buffer->Width = buf_width;
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 154164d1651..0bea34234ae 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.160 2002/04/09 16:56:50 keithw Exp $ */
+/* $Id: context.c,v 1.161 2002/04/19 00:23:08 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -477,7 +477,7 @@ init_matrix_stack( struct matrix_stack *stack,
stack->MaxDepth = maxDepth;
stack->DirtyFlag = dirtyFlag;
/* The stack */
- stack->Stack = CALLOC(maxDepth * sizeof(GLmatrix));
+ stack->Stack = (GLmatrix *) CALLOC(maxDepth * sizeof(GLmatrix));
for (i = 0; i < maxDepth; i++) {
_math_matrix_ctr(&stack->Stack[i]);
_math_matrix_alloc_inv(&stack->Stack[i]);
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 88361bd8307..b6402f95a24 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,4 +1,4 @@
-/* $Id: enable.c,v 1.59 2002/03/29 17:27:59 brianp Exp $ */
+/* $Id: enable.c,v 1.60 2002/04/19 00:23:08 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -209,7 +209,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
{
const GLuint p = cap - GL_CLIP_PLANE0;
- if ((ctx->Transform.ClipPlanesEnabled & (1 << p)) == (state << p))
+ if ((ctx->Transform.ClipPlanesEnabled & (1 << p)) == ((GLuint) state << p))
return;
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index a6d6d827ab1..6f7eb8172ea 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.67 2002/04/12 21:17:28 brianp Exp $ */
+/* $Id: texstate.c,v 1.68 2002/04/19 00:23:08 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1110,7 +1110,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
const GLenum mode = (GLenum) params[0];
if (mode == GL_NONE || mode == GL_COMPARE_R_TO_TEXTURE_ARB) {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- texObj->CompareMode = params[0];
+ texObj->CompareMode = mode;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -1129,7 +1129,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
const GLenum func = (GLenum) params[0];
if (func == GL_LEQUAL || func == GL_GEQUAL) {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- texObj->CompareFunc = params[0];
+ texObj->CompareFunc = func;
}
else if (ctx->Extensions.EXT_shadow_funcs &&
(func == GL_EQUAL ||
@@ -1139,7 +1139,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
func == GL_ALWAYS ||
func == GL_NEVER)) {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- texObj->CompareFunc = params[0];
+ texObj->CompareFunc = func;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -1159,7 +1159,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
if (result == GL_LUMINANCE || result == GL_INTENSITY
|| result == GL_ALPHA) {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- texObj->DepthMode = params[0];
+ texObj->DepthMode = result;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,