From a85fae9cb0ee1f7f24fbf4d41c62fe771673ef2f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 1 Nov 2002 23:45:30 +0000 Subject: [PATCH] silence a bunch of warnings --- src/glu/sgi/libnurbs/interface/glcurveval.cc | 10 ++-- src/glu/sgi/libtess/normal.c | 8 ++- src/glu/sgi/libtess/sweep.c | 5 +- src/glu/sgi/libtess/tess.c | 8 ++- src/glu/sgi/libutil/mipmap.c | 58 +++++++++----------- src/glu/sgi/libutil/project.c | 5 +- src/glu/sgi/libutil/quad.c | 17 +++--- 7 files changed, 52 insertions(+), 59 deletions(-) diff --git a/src/glu/sgi/libnurbs/interface/glcurveval.cc b/src/glu/sgi/libnurbs/interface/glcurveval.cc index 620526fea40..e1ef2273b32 100644 --- a/src/glu/sgi/libnurbs/interface/glcurveval.cc +++ b/src/glu/sgi/libnurbs/interface/glcurveval.cc @@ -35,8 +35,8 @@ /* * glcurveval.c++ * - * $Date: 2001/08/07 17:34:10 $ $Revision: 1.3 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glcurveval.cc,v 1.3 2001/08/07 17:34:10 brianp Exp $ + * $Date: 2002/11/01 23:45:30 $ $Revision: 1.4 $ + * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glcurveval.cc,v 1.4 2002/11/01 23:45:30 brianp Exp $ */ /* Polynomial Evaluator Interface */ @@ -149,9 +149,9 @@ OpenGLCurveEvaluator::mapgrid1f(long nu, REAL u0, REAL u1) { if(output_triangles) { - global_grid_u0 = u0; - global_grid_u1 = u1; - global_grid_nu = nu; + global_grid_u0 = (int) u0; + global_grid_u1 = (int) u1; + global_grid_nu = (int) nu; } else glMapGrid1f((GLint) nu, (GLfloat) u0, (GLfloat) u1); diff --git a/src/glu/sgi/libtess/normal.c b/src/glu/sgi/libtess/normal.c index ed4cb087295..618cfd9ccf4 100644 --- a/src/glu/sgi/libtess/normal.c +++ b/src/glu/sgi/libtess/normal.c @@ -35,8 +35,8 @@ /* ** Author: Eric Veach, July 1994. ** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/normal.c,v 1.1 2001/03/17 00:25:41 brianp Exp $ +** $Date: 2002/11/01 23:45:31 $ $Revision: 1.2 $ +** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/normal.c,v 1.2 2002/11/01 23:45:31 brianp Exp $ */ #include "gluos.h" @@ -51,6 +51,7 @@ #define Dot(u,v) (u[0]*v[0] + u[1]*v[1] + u[2]*v[2]) +#if 0 static void Normalize( GLdouble v[3] ) { GLdouble len = v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; @@ -61,6 +62,7 @@ static void Normalize( GLdouble v[3] ) v[1] /= len; v[2] /= len; } +#endif #define ABS(x) ((x) < 0 ? -(x) : (x)) @@ -198,7 +200,7 @@ extern int RandomSweep; void __gl_projectPolygon( GLUtesselator *tess ) { GLUvertex *v, *vHead = &tess->mesh->vHead; - GLdouble w, norm[3]; + GLdouble norm[3]; GLdouble *sUnit, *tUnit; int i, computedNormal = FALSE; diff --git a/src/glu/sgi/libtess/sweep.c b/src/glu/sgi/libtess/sweep.c index 831120ba52c..96e8a05c68e 100644 --- a/src/glu/sgi/libtess/sweep.c +++ b/src/glu/sgi/libtess/sweep.c @@ -35,8 +35,8 @@ /* ** Author: Eric Veach, July 1994. ** -** $Date: 2001/09/20 21:47:52 $ $Revision: 1.2 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/sweep.c,v 1.2 2001/09/20 21:47:52 kschultz Exp $ +** $Date: 2002/11/01 23:45:31 $ $Revision: 1.3 $ +** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/sweep.c,v 1.3 2002/11/01 23:45:31 brianp Exp $ */ #include "gluos.h" @@ -1174,7 +1174,6 @@ static void InitEdgeDict( GLUtesselator *tess ) static void DoneEdgeDict( GLUtesselator *tess ) { ActiveRegion *reg; - int fixedEdges = 0; /* __GL_DICTLISTKEY */ /* __GL_DICTLISTMIN */ while( (reg = (ActiveRegion *)dictKey( dictMin( tess->dict ))) != NULL ) { diff --git a/src/glu/sgi/libtess/tess.c b/src/glu/sgi/libtess/tess.c index c920235c660..0793106334f 100644 --- a/src/glu/sgi/libtess/tess.c +++ b/src/glu/sgi/libtess/tess.c @@ -35,8 +35,8 @@ /* ** Author: Eric Veach, July 1994. ** -** $Date: 2001/09/20 21:47:52 $ $Revision: 1.2 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/tess.c,v 1.2 2001/09/20 21:47:52 kschultz Exp $ +** $Date: 2002/11/01 23:45:31 $ $Revision: 1.3 $ +** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/tess.c,v 1.3 2002/11/01 23:45:31 brianp Exp $ */ #include "gluos.h" @@ -169,6 +169,8 @@ static void GotoState( GLUtesselator *tess, enum TessState newState ) CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_BEGIN_CONTOUR ); gluTessBeginContour( tess ); break; + default: + ; } } else { switch( tess->state ) { @@ -181,6 +183,8 @@ static void GotoState( GLUtesselator *tess, enum TessState newState ) /* gluTessEndPolygon( tess ) is too much work! */ MakeDormant( tess ); break; + default: + ; } } } diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index 507efb8d61b..5b275fa50d1 100644 --- a/src/glu/sgi/libutil/mipmap.c +++ b/src/glu/sgi/libutil/mipmap.c @@ -31,8 +31,8 @@ ** published by SGI, but has not been independently verified as being ** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** $Date: 2001/08/07 17:34:11 $ $Revision: 1.2 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/mipmap.c,v 1.2 2001/08/07 17:34:11 brianp Exp $ +** $Date: 2002/11/01 23:45:31 $ $Revision: 1.3 $ +** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/mipmap.c,v 1.3 2002/11/01 23:45:31 brianp Exp $ */ #include "gluos.h" @@ -573,7 +573,7 @@ static void halveImage_ushort(GLint components, GLuint width, GLuint height, GLint element_size, GLint ysize, GLint group_size, GLint myswap_bytes) { - int i, j, k, l; + int i, j, k; int newwidth, newheight; GLushort *s; const char *t; @@ -708,7 +708,7 @@ static void halveImage_short(GLint components, GLuint width, GLuint height, GLint element_size, GLint ysize, GLint group_size, GLint myswap_bytes) { - int i, j, k, l; + int i, j, k; int newwidth, newheight; GLshort *s; const char *t; @@ -850,7 +850,7 @@ static void halveImage_uint(GLint components, GLuint width, GLuint height, GLint element_size, GLint ysize, GLint group_size, GLint myswap_bytes) { - int i, j, k, l; + int i, j, k; int newwidth, newheight; GLuint *s; const char *t; @@ -990,7 +990,7 @@ static void halveImage_int(GLint components, GLuint width, GLuint height, const GLint *datain, GLint *dataout, GLint element_size, GLint ysize, GLint group_size, GLint myswap_bytes) { - int i, j, k, l; + int i, j, k; int newwidth, newheight; GLint *s; const char *t; @@ -1134,7 +1134,7 @@ static void halveImage_float(GLint components, GLuint width, GLuint height, GLint element_size, GLint ysize, GLint group_size, GLint myswap_bytes) { - int i, j, k, l; + int i, j, k; int newwidth, newheight; GLfloat *s; const char *t; @@ -1370,8 +1370,8 @@ static void scale_internal_ubyte(GLint components, GLint widthin, GLubyte *dataout, GLint element_size, GLint ysize, GLint group_size) { - float x, convx; - float y, convy; + float convx; + float convy; float percent; /* Max components in a format is 4, so... */ float totals[4]; @@ -1584,8 +1584,8 @@ static void scale_internal_byte(GLint components, GLint widthin, GLbyte *dataout, GLint element_size, GLint ysize, GLint group_size) { - float x, convx; - float y, convy; + float convx; + float convy; float percent; /* Max components in a format is 4, so... */ float totals[4]; @@ -1799,8 +1799,8 @@ static void scale_internal_ushort(GLint components, GLint widthin, GLint ysize, GLint group_size, GLint myswap_bytes) { - float x, convx; - float y, convy; + float convx; + float convy; float percent; /* Max components in a format is 4, so... */ float totals[4]; @@ -2076,8 +2076,8 @@ static void scale_internal_short(GLint components, GLint widthin, GLint ysize, GLint group_size, GLint myswap_bytes) { - float x, convx; - float y, convy; + float convx; + float convy; float percent; /* Max components in a format is 4, so... */ float totals[4]; @@ -2367,8 +2367,8 @@ static void scale_internal_uint(GLint components, GLint widthin, GLint ysize, GLint group_size, GLint myswap_bytes) { - float x, convx; - float y, convy; + float convx; + float convy; float percent; /* Max components in a format is 4, so... */ float totals[4]; @@ -2651,8 +2651,8 @@ static void scale_internal_int(GLint components, GLint widthin, GLint ysize, GLint group_size, GLint myswap_bytes) { - float x, convx; - float y, convy; + float convx; + float convy; float percent; /* Max components in a format is 4, so... */ float totals[4]; @@ -2944,8 +2944,8 @@ static void scale_internal_float(GLint components, GLint widthin, GLint ysize, GLint group_size, GLint myswap_bytes) { - float x, convx; - float y, convy; + float convx; + float convy; float percent; /* Max components in a format is 4, so... */ float totals[4]; @@ -3517,7 +3517,6 @@ int gluBuild1DMipmapLevelsCore(GLenum target, GLint internalFormat, GLushort *otherImage; GLushort *imageTemp; GLint memreq; - GLint maxsize; GLint cmpts; PixelStorageModes psm; @@ -3664,7 +3663,6 @@ static int bitmapBuild2DMipmaps(GLenum target, GLint internalFormat, GLushort *otherImage; GLushort *imageTemp; GLint memreq; - GLint maxsize; GLint cmpts; PixelStorageModes psm; @@ -3771,11 +3769,8 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat, GLint level, levels; const void *usersImage; /* passed from user. Don't touch! */ void *srcImage, *dstImage; /* scratch area to build mipmapped images */ - GLint newImage_width; - GLint newImage_height; __GLU_INIT_SWAP_IMAGE; GLint memreq; - GLint maxsize; GLint cmpts; GLint myswap_bytes, groups_per_line, element_size, group_size; @@ -4588,7 +4583,6 @@ static int fastBuild2DMipmaps(const PixelStorageModes *psm, GLubyte *otherImage; GLubyte *imageTemp; GLint memreq; - GLint maxsize; GLint cmpts; @@ -5979,8 +5973,8 @@ static void scaleInternalPackedPixel(int components, GLint pixelSizeInBytes, GLint rowSizeInBytes,GLint isSwap) { - float x, convx; - float y, convy; + float convx; + float convy; float percent; /* Max components in a format is 4, so... */ @@ -5991,7 +5985,6 @@ static void scaleInternalPackedPixel(int components, int i,j,k,xindex; const char *temp, *temp0; - const char *temp_index; int outindex; int lowx_int, highx_int, lowy_int, highy_int; @@ -7308,6 +7301,7 @@ static void emptyImage3D(const PixelStorageModes *psm, psm->unpack_skip_images * imageSize] ); } /* emptyImage3D() */ +static int gluScaleImage3D(GLenum format, GLint widthIn, GLint heightIn, GLint depthIn, GLenum typeIn, const void *dataIn, @@ -7361,6 +7355,7 @@ int gluScaleImage3D(GLenum format, return 0; } /* gluScaleImage3D() */ + static void closestFit3D(GLenum target, GLint width, GLint height, GLint depth, GLint internalFormat, GLenum format, GLenum type, GLint *newWidth, GLint *newHeight, GLint *newDepth) @@ -7434,7 +7429,6 @@ static void halveImagePackedPixelSlice(int components, int halfHeight= height / 2; int halfDepth= depth / 2; const char *src= (const char *)dataIn; - int padBytes= rowSizeInBytes - (width * pixelSizeInBytes); int outIndex= 0; assert((width == 1 || height == 1) && depth >= 2); @@ -7690,10 +7684,8 @@ static int gluBuild3DMipmapLevelsCore(GLenum target, GLint internalFormat, GLint level, levels; const void *usersImage; void *srcImage, *dstImage; - GLint newImageWidth, newImageHeight, newImageDepth; __GLU_INIT_SWAP_IMAGE; GLint memReq; - GLint maxSize; GLint cmpts; GLint myswapBytes, groupsPerLine, elementSize, groupSize; diff --git a/src/glu/sgi/libutil/project.c b/src/glu/sgi/libutil/project.c index 348bd7e40cc..ddb3e7ec757 100644 --- a/src/glu/sgi/libutil/project.c +++ b/src/glu/sgi/libutil/project.c @@ -31,8 +31,8 @@ ** published by SGI, but has not been independently verified as being ** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** $Date: 2001/09/18 16:39:38 $ $Revision: 1.4 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/project.c,v 1.4 2001/09/18 16:39:38 kschultz Exp $ +** $Date: 2002/11/01 23:45:31 $ $Revision: 1.5 $ +** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/project.c,v 1.5 2002/11/01 23:45:31 brianp Exp $ */ #include "gluos.h" @@ -116,7 +116,6 @@ gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz) { - int i; float forward[3], side[3], up[3]; GLfloat m[4][4]; diff --git a/src/glu/sgi/libutil/quad.c b/src/glu/sgi/libutil/quad.c index db397f09bfe..57e3f2636fb 100644 --- a/src/glu/sgi/libutil/quad.c +++ b/src/glu/sgi/libutil/quad.c @@ -31,8 +31,8 @@ ** published by SGI, but has not been independently verified as being ** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** $Date: 2001/09/20 21:47:52 $ $Revision: 1.2 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/quad.c,v 1.2 2001/09/20 21:47:52 kschultz Exp $ +** $Date: 2002/11/01 23:45:31 $ $Revision: 1.3 $ +** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/quad.c,v 1.3 2002/11/01 23:45:31 brianp Exp $ */ #include "gluos.h" @@ -156,7 +156,7 @@ void GLAPIENTRY gluCylinder(GLUquadric *qobj, GLdouble baseRadius, GLdouble topRadius, GLdouble height, GLint slices, GLint stacks) { - GLint i,j,max; + GLint i,j; GLfloat sinCache[CACHE_SIZE]; GLfloat cosCache[CACHE_SIZE]; GLfloat sinCache2[CACHE_SIZE]; @@ -164,7 +164,7 @@ gluCylinder(GLUquadric *qobj, GLdouble baseRadius, GLdouble topRadius, GLfloat sinCache3[CACHE_SIZE]; GLfloat cosCache3[CACHE_SIZE]; GLfloat angle; - GLfloat x, y, zLow, zHigh; + GLfloat zLow, zHigh; GLfloat sintemp, costemp; GLfloat length; GLfloat deltaRadius; @@ -438,11 +438,10 @@ gluPartialDisk(GLUquadric *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops, GLdouble startAngle, GLdouble sweepAngle) { - GLint i,j,max; + GLint i,j; GLfloat sinCache[CACHE_SIZE]; GLfloat cosCache[CACHE_SIZE]; GLfloat angle; - GLfloat x, y; GLfloat sintemp, costemp; GLfloat deltaRadius; GLfloat radiusLow, radiusHigh; @@ -700,7 +699,7 @@ gluPartialDisk(GLUquadric *qobj, GLdouble innerRadius, void GLAPIENTRY gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks) { - GLint i,j,max; + GLint i,j; GLfloat sinCache1a[CACHE_SIZE]; GLfloat cosCache1a[CACHE_SIZE]; GLfloat sinCache2a[CACHE_SIZE]; @@ -714,11 +713,9 @@ gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks) GLfloat sinCache3b[CACHE_SIZE]; GLfloat cosCache3b[CACHE_SIZE]; GLfloat angle; - GLfloat x, y, zLow, zHigh; + GLfloat zLow, zHigh; GLfloat sintemp1, sintemp2, sintemp3, sintemp4; GLfloat costemp1, costemp2, costemp3, costemp4; - GLfloat zNormal; - GLfloat xyNormalRatio; GLboolean needCache2, needCache3; GLint start, finish; -- 2.30.2