fixed some broken error checks.

diff -urNp Mesa-3.4.2/src/FX/fxtexman.c Mesa-3.4.2x/src/FX/fxtexman.c
--- Mesa-3.4.2/src/FX/fxtexman.c	2000-03-31 08:49:45.000000000 +0300
+++ Mesa-3.4.2x/src/FX/fxtexman.c	2016-07-28 07:10:00.000000000 +0300
@@ -295,7 +295,7 @@ static MemRange *fxTMAddObj(fxMesaContex
 			    struct gl_texture_object *tObj,
 			    GLint tmu, int texmemsize)
 {
-  FxU32 startAddr;
+  FxI32 startAddr;
   MemRange *range;
 
   startAddr=fxTMFindStartAddr(fxMesa, tmu, texmemsize);
diff -urNp Mesa-3.4.2/src/imaging.c Mesa-3.4.2x/src/imaging.c
--- Mesa-3.4.2/src/imaging.c	2001-05-10 01:24:55.000000000 +0300
+++ Mesa-3.4.2x/src/imaging.c	2016-07-28 07:10:00.000000000 +0300
@@ -915,7 +915,7 @@ _mesa_update_histogram(GLcontext *ctx, G
 void
 _mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)
 {
-   GLenum baseFormat;
+   GLint baseFormat;
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glConvolutionFilter1D");
 
@@ -980,7 +980,7 @@ _mesa_ConvolutionFilter1D(GLenum target,
 void
 _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
 {
-   GLenum baseFormat;
+   GLint baseFormat;
    GLint i, components;
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glConvolutionFilter2D");
@@ -1254,7 +1254,7 @@ _mesa_ConvolutionParameteriv(GLenum targ
 void
 _mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width)
 {
-   GLenum baseFormat;
+   GLint baseFormat;
    GLubyte rgba[MAX_CONVOLUTION_WIDTH][4];
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCopyConvolutionFilter1D");
@@ -1289,7 +1289,7 @@ _mesa_CopyConvolutionFilter1D(GLenum tar
 void
 _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height)
 {
-   GLenum baseFormat;
+   GLint baseFormat;
    GLint i;
    struct gl_pixelstore_attrib packSave;
    GLubyte rgba[MAX_CONVOLUTION_HEIGHT][MAX_CONVOLUTION_WIDTH][4];
@@ -1560,7 +1560,7 @@ void
 _mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
 {
    const GLint colStart = MAX_CONVOLUTION_WIDTH * 4;
-   GLenum baseFormat;
+   GLint baseFormat;
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glSeparableFilter2D");
 
diff -urNp Mesa-3.4.2/src/varray.c Mesa-3.4.2x/src/varray.c
--- Mesa-3.4.2/src/varray.c	2000-12-13 02:57:24.000000000 +0200
+++ Mesa-3.4.2x/src/varray.c	2016-07-28 07:10:00.000000000 +0300
@@ -1237,7 +1237,7 @@ _mesa_DrawElements(GLenum mode, GLsizei 
       return;
    }
 
-   if (mode < 0 || mode > GL_POLYGON) {
+   if (mode > GL_POLYGON) {
       gl_error( ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" );
       return;
    }

diff -urNp Mesa-3.4.2/src/config.c Mesa-3.4.2x/src/config.c
--- Mesa-3.4.2/src/config.c	2015-10-21 14:55:00.000000000 +0300
+++ Mesa-3.4.2x/src/config.c	2016-07-28 07:10:00.000000000 +0300
@@ -60,6 +60,7 @@ struct cnode {
 
 /* Pretty printer for debugging.
  */
+#if 0
 static void pad(int n) { putchar('\n'); while(n--) putchar(' '); }
 
 static void print_list( struct cnode *n, int indent ) 
@@ -85,8 +86,7 @@ static void print_list( struct cnode *n,
    }
    printf(" )");
 }
-
-
+#endif
 
 /* Accessors to query the contents of a cnode.
  */
