fixed a bunch of g++ warnings/errors.  Compiling with g++ can help find lots of potential problems
diff --git a/src/mesa/main/clip.c b/src/mesa/main/clip.c
index d2bbd8b..14930e2 100644
--- a/src/mesa/main/clip.c
+++ b/src/mesa/main/clip.c
@@ -1,4 +1,4 @@
-/* $Id: clip.c,v 1.20 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: clip.c,v 1.21 2001/03/07 05:06:11 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -59,7 +59,7 @@
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
    p = (GLint) plane - (GLint) GL_CLIP_PLANE0;
-   if (p < 0 || p >= ctx->Const.MaxClipPlanes) {
+   if (p < 0 || p >= (GLint) ctx->Const.MaxClipPlanes) {
       _mesa_error( ctx, GL_INVALID_ENUM, "glClipPlane" );
       return;
    }
@@ -114,7 +114,7 @@
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
    p = (GLint) (plane - GL_CLIP_PLANE0);
-   if (p < 0 || p >= ctx->Const.MaxClipPlanes) {
+   if (p < 0 || p >= (GLint) ctx->Const.MaxClipPlanes) {
       _mesa_error( ctx, GL_INVALID_ENUM, "glGetClipPlane" );
       return;
    }
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index f9693c6..c3ba3c5 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -1,4 +1,4 @@
-/* $Id: colortab.c,v 1.35 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: colortab.c,v 1.36 2001/03/07 05:06:11 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -314,7 +314,7 @@
       return;
    }
 
-   if (width > ctx->Const.MaxColorTableSize) {
+   if (width > (GLsizei) ctx->Const.MaxColorTableSize) {
       if (proxy) {
          table->Size = 0;
          table->IntFormat = (GLenum) 0;
@@ -344,7 +344,7 @@
          if (floatTable) {
             GLfloat tempTab[MAX_COLOR_TABLE_SIZE * 4];
             GLfloat *tableF;
-            GLuint i;
+            GLint i;
 
             _mesa_unpack_float_color_span(ctx, width, table->Format,
                                           tempTab,  /* dest */
@@ -411,7 +411,7 @@
                return;
             }
             _mesa_unpack_chan_color_span(ctx, width, table->Format,
-                                         table->Table,  /* dest */
+                                         (GLchan *) table->Table,  /* dest */
                                          format, type, data,
                                          &ctx->Unpack, 0);
          } /* floatTable */
@@ -514,7 +514,7 @@
    comps = _mesa_components_in_format(table->Format);
    assert(comps > 0);  /* error should have been caught sooner */
 
-   if (start + count > table->Size) {
+   if (start + count > (GLint) table->Size) {
       _mesa_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)");
       return;
    }
@@ -532,7 +532,7 @@
    else {
       GLfloat tempTab[MAX_COLOR_TABLE_SIZE * 4];
       GLfloat *tableF;
-      GLuint i;
+      GLint i;
 
       ASSERT(table->FloatTable);
 
@@ -673,7 +673,6 @@
    struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
    struct gl_color_table *table = NULL;
    GLchan rgba[MAX_COLOR_TABLE_SIZE][4];
-   GLint i;
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
    if (ctx->NewState) {
@@ -713,6 +712,7 @@
       case GL_ALPHA:
          if (table->FloatTable) {
             const GLfloat *tableF = (const GLfloat *) table->Table;
+            GLuint i;
             for (i = 0; i < table->Size; i++) {
                rgba[i][RCOMP] = 0;
                rgba[i][GCOMP] = 0;
@@ -722,6 +722,7 @@
          }
          else {
             const GLchan *tableUB = (const GLchan *) table->Table;
+            GLuint i;
             for (i = 0; i < table->Size; i++) {
                rgba[i][RCOMP] = 0;
                rgba[i][GCOMP] = 0;
@@ -733,6 +734,7 @@
       case GL_LUMINANCE:
          if (table->FloatTable) {
             const GLfloat *tableF = (const GLfloat *) table->Table;
+            GLuint i;
             for (i = 0; i < table->Size; i++) {
                rgba[i][RCOMP] = (GLint) (tableF[i] * CHAN_MAXF);
                rgba[i][GCOMP] = (GLint) (tableF[i] * CHAN_MAXF);
@@ -742,6 +744,7 @@
          }
          else {
             const GLchan *tableUB = (const GLchan *) table->Table;
+            GLuint i;
             for (i = 0; i < table->Size; i++) {
                rgba[i][RCOMP] = tableUB[i];
                rgba[i][GCOMP] = tableUB[i];
@@ -753,6 +756,7 @@
       case GL_LUMINANCE_ALPHA:
          if (table->FloatTable) {
             const GLfloat *tableF = (const GLfloat *) table->Table;
+            GLuint i;
             for (i = 0; i < table->Size; i++) {
                rgba[i][RCOMP] = (GLint) (tableF[i*2+0] * CHAN_MAXF);
                rgba[i][GCOMP] = (GLint) (tableF[i*2+0] * CHAN_MAXF);
@@ -762,6 +766,7 @@
          }
          else {
             const GLchan *tableUB = (const GLchan *) table->Table;
+            GLuint i;
             for (i = 0; i < table->Size; i++) {
                rgba[i][RCOMP] = tableUB[i*2+0];
                rgba[i][GCOMP] = tableUB[i*2+0];
@@ -773,6 +778,7 @@
       case GL_INTENSITY:
          if (table->FloatTable) {
             const GLfloat *tableF = (const GLfloat *) table->Table;
+            GLuint i;
             for (i = 0; i < table->Size; i++) {
                rgba[i][RCOMP] = (GLint) (tableF[i] * CHAN_MAXF);
                rgba[i][GCOMP] = (GLint) (tableF[i] * CHAN_MAXF);
@@ -782,6 +788,7 @@
          }
          else {
             const GLchan *tableUB = (const GLchan *) table->Table;
+            GLuint i;
             for (i = 0; i < table->Size; i++) {
                rgba[i][RCOMP] = tableUB[i];
                rgba[i][GCOMP] = tableUB[i];
@@ -793,6 +800,7 @@
       case GL_RGB:
          if (table->FloatTable) {
             const GLfloat *tableF = (const GLfloat *) table->Table;
+            GLuint i;
             for (i = 0; i < table->Size; i++) {
                rgba[i][RCOMP] = (GLint) (tableF[i*3+0] * CHAN_MAXF);
                rgba[i][GCOMP] = (GLint) (tableF[i*3+1] * CHAN_MAXF);
@@ -802,6 +810,7 @@
          }
          else {
             const GLchan *tableUB = (const GLchan *) table->Table;
+            GLuint i;
             for (i = 0; i < table->Size; i++) {
                rgba[i][RCOMP] = tableUB[i*3+0];
                rgba[i][GCOMP] = tableUB[i*3+1];
@@ -813,6 +822,7 @@
       case GL_RGBA:
          if (table->FloatTable) {
             const GLfloat *tableF = (const GLfloat *) table->Table;
+            GLuint i;
             for (i = 0; i < table->Size; i++) {
                rgba[i][RCOMP] = (GLint) (tableF[i*4+0] * CHAN_MAXF + 0.5F);
                rgba[i][GCOMP] = (GLint) (tableF[i*4+1] * CHAN_MAXF + 0.5F);
@@ -822,6 +832,7 @@
          }
          else {
             const GLchan *tableUB = (const GLchan *) table->Table;
+            GLuint i;
             for (i = 0; i < table->Size; i++) {
                rgba[i][RCOMP] = tableUB[i*4+0];
                rgba[i][GCOMP] = tableUB[i*4+1];
diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c
index 0b1d411..dcc4d59 100644
--- a/src/mesa/main/convolve.c
+++ b/src/mesa/main/convolve.c
@@ -1,4 +1,4 @@
-/* $Id: convolve.c,v 1.20 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: convolve.c,v 1.21 2001/03/07 05:06:11 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -564,7 +564,7 @@
 _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *image)
 {
    const struct gl_convolution_attrib *filter;
-   GLint row;
+   GLuint row;
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 988bcd1..4f93d0d 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1,4 +1,4 @@
-/* $Id: dlist.c,v 1.65 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: dlist.c,v 1.66 2001/03/07 05:06:11 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -329,8 +329,8 @@
 
       /* check for extension opcodes first */
 
-      int i = (int)n[0].opcode - (int)OPCODE_DRV_0;
-      if (i >= 0 && i < ctx->listext.nr_opcodes) {
+      GLint i = (GLint) n[0].opcode - (GLint) OPCODE_DRV_0;
+      if (i >= 0 && i < (GLint) ctx->listext.nr_opcodes) {
 	 ctx->listext.opcode[i].destroy(ctx, &n[1]);
 	 n += ctx->listext.opcode[i].size;
       }
@@ -658,7 +658,7 @@
 
 #ifdef DEBUG
    if (opcode < (int) OPCODE_DRV_0) {
-      assert( (GLint) count == InstSize[opcode] );
+      assert( count == InstSize[opcode] );
    }
 #endif
 
@@ -3992,7 +3992,7 @@
       OpCode opcode = n[0].opcode;
       int i = (int)n[0].opcode - (int)OPCODE_DRV_0;
 
-      if (i >= 0 && i < ctx->listext.nr_opcodes) {
+      if (i >= 0 && i < (GLint) ctx->listext.nr_opcodes) {
 	 ctx->listext.opcode[i].execute(ctx, &n[1]);
 	 n += ctx->listext.opcode[i].size;
       }
@@ -5917,12 +5917,13 @@
    done = n ? GL_FALSE : GL_TRUE;
    while (!done) {
       OpCode opcode = n[0].opcode;
-      int i = (int)n[0].opcode - (int)OPCODE_DRV_0;
+      GLint i = (GLint) n[0].opcode - (GLint) OPCODE_DRV_0;
 
-      if (i >= 0 && i < ctx->listext.nr_opcodes) {
+      if (i >= 0 && i < (GLint) ctx->listext.nr_opcodes) {
 	 ctx->listext.opcode[i].print(ctx, &n[1]);
 	 n += ctx->listext.opcode[i].size;
-      } else {
+      }
+      else {
 	 switch (opcode) {
          case OPCODE_ACCUM:
             fprintf(f,"accum %s %g\n", enum_string(n[1].e), n[2].f );
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index de18c7c..faaa92c 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -1,4 +1,4 @@
-/* $Id: enums.c,v 1.12 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: enums.c,v 1.13 2001/03/07 05:06:11 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -862,7 +862,7 @@
 
 static void sort_enums( void )
 {
-   int i;
+   GLuint i;
    index1 = (enum_elt **)MALLOC( Elements(all_enums) * sizeof(enum_elt *) );
    sorted = 1;
 
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 89bfcc2..8fcb556 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -1,4 +1,4 @@
-/* $Id: image.c,v 1.57 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: image.c,v 1.58 2001/03/07 05:06:11 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -620,9 +620,9 @@
    width_in_bytes = CEILING( width, 8 );
    dst = buffer;
    for (row = 0; row < height; row++) {
-      GLubyte *src = _mesa_image_address( packing, pixels, width, height,
-                                          GL_COLOR_INDEX, GL_BITMAP,
-                                          0, row, 0 );
+      const GLubyte *src = (const GLubyte *)
+         _mesa_image_address(packing, pixels, width, height,
+                             GL_COLOR_INDEX, GL_BITMAP, 0, row, 0);
       if (!src) {
          FREE(buffer);
          return NULL;
@@ -640,7 +640,7 @@
          if (packing->LsbFirst) {
             GLubyte srcMask = 1 << (packing->SkipPixels & 0x7);
             GLubyte dstMask = 128;
-            GLubyte *s = src;
+            const GLubyte *s = src;
             GLubyte *d = dst;
             *d = 0;
             for (i = 0; i < width; i++) {
@@ -667,7 +667,7 @@
          else {
             GLubyte srcMask = 128 >> (packing->SkipPixels & 0x7);
             GLubyte dstMask = 128;
-            GLubyte *s = src;
+            const GLubyte *s = src;
             GLubyte *d = dst;
             *d = 0;
             for (i = 0; i < width; i++) {
@@ -715,9 +715,8 @@
    width_in_bytes = CEILING( width, 8 );
    src = source;
    for (row = 0; row < height; row++) {
-      GLubyte *dst = _mesa_image_address( packing, dest, width, height,
-                                          GL_COLOR_INDEX, GL_BITMAP,
-                                          0, row, 0 );
+      GLubyte *dst = (GLubyte *) _mesa_image_address( packing, dest,
+                       width, height, GL_COLOR_INDEX, GL_BITMAP, 0, row, 0 );
       if (!dst)
          return;
 
@@ -1725,7 +1724,7 @@
    }
    else if (transferOps == 0 && dstFormat == GL_RGB && dstType == CHAN_TYPE) {
       /* common simple case */
-      GLint i;
+      GLuint i;
       GLchan *dest = (GLchan *) dstAddr;
       for (i = 0; i < n; i++) {
          dest[0] = srcRgba[i][RCOMP];
@@ -3591,7 +3590,7 @@
  * Pack an array of depth values.  The values are floats in [0,1].
  */
 void
-_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLdepth *dest,
+_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest,
                        GLenum dstType, const GLfloat *depthSpan,
                        const struct gl_pixelstore_attrib *dstPacking )
 {
@@ -3738,7 +3737,7 @@
    }
 
    {
-      GLubyte *destBuffer = MALLOC(bytesPerRow * height * depth);
+      GLubyte *destBuffer = (GLubyte *) MALLOC(bytesPerRow * height * depth);
       GLubyte *dst;
       GLint img, row;
       if (!destBuffer)
diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h
index 7ad693e..12376f1 100644
--- a/src/mesa/main/image.h
+++ b/src/mesa/main/image.h
@@ -1,4 +1,4 @@
-/* $Id: image.h,v 1.16 2001/02/17 18:41:01 brianp Exp $ */
+/* $Id: image.h,v 1.17 2001/03/07 05:06:12 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -156,7 +156,7 @@
                          const struct gl_pixelstore_attrib *srcPacking );
 
 extern void
-_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLdepth *dest,
+_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest,
                        GLenum dstType, const GLfloat *depthSpan,
                        const struct gl_pixelstore_attrib *dstPacking );
 
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 6e0741a..d611c6e 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -1,4 +1,4 @@
-/* $Id: imports.c,v 1.6 2001/03/02 16:01:22 brianp Exp $ */
+/* $Id: imports.c,v 1.7 2001/03/07 05:06:12 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -130,14 +130,14 @@
 static int
 _mesa_fclose(__GLcontext *gc, void *stream)
 {
-   return fclose(stream);
+   return fclose((FILE *) stream);
 }
 
 static int
 _mesa_fprintf(__GLcontext *gc, void *stream, const char *fmt, ...)
 {
    /* XXX fix this */
-   return fprintf(stream, fmt);
+   return fprintf((FILE *) stream, fmt);
 }
 
 /* XXX this really is driver-specific and can't be here */
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index a7fce7e..1ce12e3 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -1,4 +1,4 @@
-/* $Id: light.c,v 1.39 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: light.c,v 1.40 2001/03/07 05:06:12 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -90,7 +90,7 @@
    GLint i = (GLint) (light - GL_LIGHT0);
    struct gl_light *l = &ctx->Light.Light[i];
 
-   if (i < 0 || i >= ctx->Const.MaxLights) {
+   if (i < 0 || i >= (GLint) ctx->Const.MaxLights) {
       _mesa_error( ctx, GL_INVALID_ENUM, "glLight" );
       return;
    }
@@ -265,7 +265,7 @@
    GLint l = (GLint) (light - GL_LIGHT0);
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
-   if (l < 0 || l >= ctx->Const.MaxLights) {
+   if (l < 0 || l >= (GLint) ctx->Const.MaxLights) {
       _mesa_error( ctx, GL_INVALID_ENUM, "glGetLightfv" );
       return;
    }
@@ -316,7 +316,7 @@
    GLint l = (GLint) (light - GL_LIGHT0);
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
-   if (l < 0 || l >= ctx->Const.MaxLights) {
+   if (l < 0 || l >= (GLint) ctx->Const.MaxLights) {
       _mesa_error( ctx, GL_INVALID_ENUM, "glGetLightiv" );
       return;
    }
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 79a4353..53fcffb 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1,4 +1,4 @@
-/* $Id: teximage.c,v 1.82 2001/03/05 22:18:23 brianp Exp $ */
+/* $Id: teximage.c,v 1.83 2001/03/07 05:06:12 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -56,50 +56,49 @@
 #ifdef DEBUG
 static void PrintTexture(const struct gl_texture_image *img)
 {
-  int i, j, c;
-  GLchan *data = img->Data;
+   GLuint i, j, c;
+   const GLchan *data = (const GLchan *) img->Data;
 
-  if (!data) {
-     printf("No texture data\n");
-     return;
-  }
+   if (!data) {
+      printf("No texture data\n");
+      return;
+   }
 
-  switch (img->Format) {
-     case GL_ALPHA:
-     case GL_LUMINANCE:
-     case GL_INTENSITY:
-     case GL_COLOR_INDEX:
-        c = 1;
-        break;
-     case GL_LUMINANCE_ALPHA:
-        c = 2;
-        break;
-     case GL_RGB:
-        c = 3;
-        break;
-     case GL_RGBA:
-        c = 4;
-        break;
-     default:
-        _mesa_problem(NULL, "error in PrintTexture\n");
-        return;
-  }
+   switch (img->Format) {
+      case GL_ALPHA:
+      case GL_LUMINANCE:
+      case GL_INTENSITY:
+      case GL_COLOR_INDEX:
+         c = 1;
+         break;
+      case GL_LUMINANCE_ALPHA:
+         c = 2;
+         break;
+      case GL_RGB:
+         c = 3;
+         break;
+      case GL_RGBA:
+         c = 4;
+         break;
+      default:
+         _mesa_problem(NULL, "error in PrintTexture\n");
+         return;
+   }
 
-
-  for (i = 0; i < img->Height; i++) {
-    for (j = 0; j < img->Width; j++) {
-      if (c==1)
-        printf("%02x  ", data[0]);
-      else if (c==2)
-        printf("%02x%02x  ", data[0], data[1]);
-      else if (c==3)
-        printf("%02x%02x%02x  ", data[0], data[1], data[2]);
-      else if (c==4)
-        printf("%02x%02x%02x%02x  ", data[0], data[1], data[2], data[3]);
-      data += c;
-    }
-    printf("\n");
-  }
+   for (i = 0; i < img->Height; i++) {
+      for (j = 0; j < img->Width; j++) {
+         if (c==1)
+            printf("%02x  ", data[0]);
+         else if (c==2)
+            printf("%02x%02x  ", data[0], data[1]);
+         else if (c==3)
+            printf("%02x%02x%02x  ", data[0], data[1], data[2]);
+         else if (c==4)
+            printf("%02x%02x%02x%02x  ", data[0], data[1], data[2], data[3]);
+         data += c;
+      }
+      printf("\n");
+   }
 }
 #endif
 
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 91763dc..d21503a 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.35 2001/03/03 20:33:28 brianp Exp $ */
+/* $Id: texstate.c,v 1.36 2001/03/07 05:06:12 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -1165,7 +1165,7 @@
       case GL_SHADOW_AMBIENT_SGIX:
          if (ctx->Extensions.SGIX_shadow_ambient) {
             /* XXX range? */
-            *params = CHAN_TO_FLOAT(obj->ShadowAmbient);
+            *params = (GLint) CHAN_TO_FLOAT(obj->ShadowAmbient);
          }
          else {
             _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)");
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 37aadbc..4164e7a 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -1,4 +1,4 @@
-/* $Id: texstore.c,v 1.9 2001/03/03 20:33:28 brianp Exp $ */
+/* $Id: texstore.c,v 1.10 2001/03/07 05:06:12 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -820,7 +820,7 @@
       return;      /* out of memory */
 
    /* unpack image, apply transfer ops and store in texImage->Data */
-   _mesa_transfer_teximage(ctx, 1, texImage->Format, texImage->Data,
+   _mesa_transfer_teximage(ctx, 1, texImage->Format, (GLchan *) texImage->Data,
                            width, 1, 1, 0, 0, 0,
                            0, /* dstRowStride */
                            0, /* dstImageStride */
@@ -873,7 +873,7 @@
       return;      /* out of memory */
 
    /* unpack image, apply transfer ops and store in texImage->Data */
-   _mesa_transfer_teximage(ctx, 2, texImage->Format, texImage->Data,
+   _mesa_transfer_teximage(ctx, 2, texImage->Format, (GLchan *) texImage->Data,
                            width, height, 1, 0, 0, 0,
                            texImage->Width * components * sizeof(GLchan),
                            0, /* dstImageStride */
@@ -921,7 +921,7 @@
       return;      /* out of memory */
 
    /* unpack image, apply transfer ops and store in texImage->Data */
-   _mesa_transfer_teximage(ctx, 3, texImage->Format, texImage->Data,
+   _mesa_transfer_teximage(ctx, 3, texImage->Format, (GLchan *) texImage->Data,
                            width, height, depth, 0, 0, 0,
                            texImage->Width * components * sizeof(GLchan),
                            texImage->Width * texImage->Height * components
@@ -943,7 +943,7 @@
                           struct gl_texture_object *texObj,
                           struct gl_texture_image *texImage)
 {
-   _mesa_transfer_teximage(ctx, 1, texImage->Format, texImage->Data,
+   _mesa_transfer_teximage(ctx, 1, texImage->Format, (GLchan *) texImage->Data,
                            width, 1, 1, /* src size */
                            xoffset, 0, 0, /* dest offsets */
                            0, /* dstRowStride */
@@ -966,7 +966,7 @@
 {
    const GLint components = components_in_intformat(texImage->IntFormat);
    const GLint compSize = _mesa_sizeof_type(texImage->Type);
-   _mesa_transfer_teximage(ctx, 2, texImage->Format, texImage->Data,
+   _mesa_transfer_teximage(ctx, 2, texImage->Format, (GLchan *) texImage->Data,
                            width, height, 1, /* src size */
                            xoffset, yoffset, 0, /* dest offsets */
                            texImage->Width * components * compSize,
@@ -989,7 +989,7 @@
 {
    const GLint components = components_in_intformat(texImage->IntFormat);
    const GLint compSize = _mesa_sizeof_type(texImage->Type);
-   _mesa_transfer_teximage(ctx, 3, texImage->Format, texImage->Data,
+   _mesa_transfer_teximage(ctx, 3, texImage->Format, (GLchan *) texImage->Data,
                            width, height, depth, /* src size */
                            xoffset, yoffset, xoffset, /* dest offsets */
                            texImage->Width * components * compSize,
diff --git a/src/mesa/main/texutil.c b/src/mesa/main/texutil.c
index b0c6793..08e991f 100644
--- a/src/mesa/main/texutil.c
+++ b/src/mesa/main/texutil.c
@@ -1,4 +1,4 @@
-/* $Id: texutil.c,v 1.12 2001/03/03 20:33:28 brianp Exp $ */
+/* $Id: texutil.c,v 1.13 2001/03/07 05:06:12 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -135,10 +135,6 @@
                GLubyte *dst = (GLubyte *) dstImage;
                GLint row;
                for (row = 0; row < dstHeight; row++) {
-		  GLuint i;
-		  for (i = 0 ; i < dstWidth ; i++)
-		     fprintf(stderr, "%02x ", src[i]);
-		  fprintf(stderr, "\n");
                   MEMCPY(dst, src, dstWidth * sizeof(GLubyte));
                   dst += dstRowStride;
                   src += srcStride;
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index fdc2a90..6d63bc1 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1,4 +1,4 @@
-/* $Id: varray.c,v 1.37 2001/03/03 20:33:28 brianp Exp $ */
+/* $Id: varray.c,v 1.38 2001/03/07 05:06:12 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -654,14 +654,14 @@
          _mesa_TexCoordPointer( tcomps, GL_FLOAT, stride,
 				(GLubyte *) pointer + i * coffset );
       }
-      for (i = factor; i < ctx->Const.MaxTextureUnits; i++) {
+      for (i = factor; i < (GLint) ctx->Const.MaxTextureUnits; i++) {
          _mesa_ClientActiveTextureARB( (GLenum) (GL_TEXTURE0_ARB + i) );
          _mesa_DisableClientState( GL_TEXTURE_COORD_ARRAY );
       }
    }
    else {
       GLint i;
-      for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
+      for (i = 0; i < (GLint) ctx->Const.MaxTextureUnits; i++) {
          _mesa_ClientActiveTextureARB( (GLenum) (GL_TEXTURE0_ARB + i) );
          _mesa_DisableClientState( GL_TEXTURE_COORD_ARRAY );
       }
@@ -707,7 +707,8 @@
    if (MESA_VERBOSE & VERBOSE_API)
       fprintf(stderr, "glLockArrays %d %d\n", first, count);
 
-   if (first == 0 && count > 0 && count <= ctx->Const.MaxArrayLockSize) {
+   if (first == 0 && count > 0 &&
+       count <= (GLint) ctx->Const.MaxArrayLockSize) {
       ctx->Array.LockFirst = first;
       ctx->Array.LockCount = count;
    }