added some casts
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index a0b7f15..acca570 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 @@
    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 be79341..e1706c3 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 @@
          (*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 @@
          (*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 154164d..0bea342 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 @@
    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 88361bd..b6402f9 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 @@
          {
             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 a6d6d82..6f7eb81 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 @@
             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 @@
             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 @@
                       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 @@
             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,