silence a bunch of warnings

This commit is contained in:
Brian Paul 2002-11-01 23:45:30 +00:00
parent 034e8641bb
commit a85fae9cb0
7 changed files with 52 additions and 59 deletions

View file

@ -35,8 +35,8 @@
/* /*
* glcurveval.c++ * glcurveval.c++
* *
* $Date: 2001/08/07 17:34:10 $ $Revision: 1.3 $ * $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.3 2001/08/07 17:34:10 brianp Exp $ * $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 */ /* Polynomial Evaluator Interface */
@ -149,9 +149,9 @@ OpenGLCurveEvaluator::mapgrid1f(long nu, REAL u0, REAL u1)
{ {
if(output_triangles) if(output_triangles)
{ {
global_grid_u0 = u0; global_grid_u0 = (int) u0;
global_grid_u1 = u1; global_grid_u1 = (int) u1;
global_grid_nu = nu; global_grid_nu = (int) nu;
} }
else else
glMapGrid1f((GLint) nu, (GLfloat) u0, (GLfloat) u1); glMapGrid1f((GLint) nu, (GLfloat) u0, (GLfloat) u1);

View file

@ -35,8 +35,8 @@
/* /*
** Author: Eric Veach, July 1994. ** Author: Eric Veach, July 1994.
** **
** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ ** $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.1 2001/03/17 00:25:41 brianp Exp $ ** $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" #include "gluos.h"
@ -51,6 +51,7 @@
#define Dot(u,v) (u[0]*v[0] + u[1]*v[1] + u[2]*v[2]) #define Dot(u,v) (u[0]*v[0] + u[1]*v[1] + u[2]*v[2])
#if 0
static void Normalize( GLdouble v[3] ) static void Normalize( GLdouble v[3] )
{ {
GLdouble len = v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; 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[1] /= len;
v[2] /= len; v[2] /= len;
} }
#endif
#define ABS(x) ((x) < 0 ? -(x) : (x)) #define ABS(x) ((x) < 0 ? -(x) : (x))
@ -198,7 +200,7 @@ extern int RandomSweep;
void __gl_projectPolygon( GLUtesselator *tess ) void __gl_projectPolygon( GLUtesselator *tess )
{ {
GLUvertex *v, *vHead = &tess->mesh->vHead; GLUvertex *v, *vHead = &tess->mesh->vHead;
GLdouble w, norm[3]; GLdouble norm[3];
GLdouble *sUnit, *tUnit; GLdouble *sUnit, *tUnit;
int i, computedNormal = FALSE; int i, computedNormal = FALSE;

View file

@ -35,8 +35,8 @@
/* /*
** Author: Eric Veach, July 1994. ** Author: Eric Veach, July 1994.
** **
** $Date: 2001/09/20 21:47:52 $ $Revision: 1.2 $ ** $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.2 2001/09/20 21:47:52 kschultz Exp $ ** $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" #include "gluos.h"
@ -1174,7 +1174,6 @@ static void InitEdgeDict( GLUtesselator *tess )
static void DoneEdgeDict( GLUtesselator *tess ) static void DoneEdgeDict( GLUtesselator *tess )
{ {
ActiveRegion *reg; ActiveRegion *reg;
int fixedEdges = 0;
/* __GL_DICTLISTKEY */ /* __GL_DICTLISTMIN */ /* __GL_DICTLISTKEY */ /* __GL_DICTLISTMIN */
while( (reg = (ActiveRegion *)dictKey( dictMin( tess->dict ))) != NULL ) { while( (reg = (ActiveRegion *)dictKey( dictMin( tess->dict ))) != NULL ) {

View file

@ -35,8 +35,8 @@
/* /*
** Author: Eric Veach, July 1994. ** Author: Eric Veach, July 1994.
** **
** $Date: 2001/09/20 21:47:52 $ $Revision: 1.2 $ ** $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.2 2001/09/20 21:47:52 kschultz Exp $ ** $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" #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 ); CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_BEGIN_CONTOUR );
gluTessBeginContour( tess ); gluTessBeginContour( tess );
break; break;
default:
;
} }
} else { } else {
switch( tess->state ) { switch( tess->state ) {
@ -181,6 +183,8 @@ static void GotoState( GLUtesselator *tess, enum TessState newState )
/* gluTessEndPolygon( tess ) is too much work! */ /* gluTessEndPolygon( tess ) is too much work! */
MakeDormant( tess ); MakeDormant( tess );
break; break;
default:
;
} }
} }
} }

View file

@ -31,8 +31,8 @@
** published by SGI, but has not been independently verified as being ** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification. ** compliant with the OpenGL(R) version 1.2.1 Specification.
** **
** $Date: 2001/08/07 17:34:11 $ $Revision: 1.2 $ ** $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.2 2001/08/07 17:34:11 brianp Exp $ ** $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" #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 element_size, GLint ysize, GLint group_size,
GLint myswap_bytes) GLint myswap_bytes)
{ {
int i, j, k, l; int i, j, k;
int newwidth, newheight; int newwidth, newheight;
GLushort *s; GLushort *s;
const char *t; 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 element_size, GLint ysize, GLint group_size,
GLint myswap_bytes) GLint myswap_bytes)
{ {
int i, j, k, l; int i, j, k;
int newwidth, newheight; int newwidth, newheight;
GLshort *s; GLshort *s;
const char *t; 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 element_size, GLint ysize, GLint group_size,
GLint myswap_bytes) GLint myswap_bytes)
{ {
int i, j, k, l; int i, j, k;
int newwidth, newheight; int newwidth, newheight;
GLuint *s; GLuint *s;
const char *t; 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, const GLint *datain, GLint *dataout, GLint element_size,
GLint ysize, GLint group_size, GLint myswap_bytes) GLint ysize, GLint group_size, GLint myswap_bytes)
{ {
int i, j, k, l; int i, j, k;
int newwidth, newheight; int newwidth, newheight;
GLint *s; GLint *s;
const char *t; 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 element_size, GLint ysize, GLint group_size,
GLint myswap_bytes) GLint myswap_bytes)
{ {
int i, j, k, l; int i, j, k;
int newwidth, newheight; int newwidth, newheight;
GLfloat *s; GLfloat *s;
const char *t; const char *t;
@ -1370,8 +1370,8 @@ static void scale_internal_ubyte(GLint components, GLint widthin,
GLubyte *dataout, GLint element_size, GLubyte *dataout, GLint element_size,
GLint ysize, GLint group_size) GLint ysize, GLint group_size)
{ {
float x, convx; float convx;
float y, convy; float convy;
float percent; float percent;
/* Max components in a format is 4, so... */ /* Max components in a format is 4, so... */
float totals[4]; float totals[4];
@ -1584,8 +1584,8 @@ static void scale_internal_byte(GLint components, GLint widthin,
GLbyte *dataout, GLint element_size, GLbyte *dataout, GLint element_size,
GLint ysize, GLint group_size) GLint ysize, GLint group_size)
{ {
float x, convx; float convx;
float y, convy; float convy;
float percent; float percent;
/* Max components in a format is 4, so... */ /* Max components in a format is 4, so... */
float totals[4]; float totals[4];
@ -1799,8 +1799,8 @@ static void scale_internal_ushort(GLint components, GLint widthin,
GLint ysize, GLint group_size, GLint ysize, GLint group_size,
GLint myswap_bytes) GLint myswap_bytes)
{ {
float x, convx; float convx;
float y, convy; float convy;
float percent; float percent;
/* Max components in a format is 4, so... */ /* Max components in a format is 4, so... */
float totals[4]; float totals[4];
@ -2076,8 +2076,8 @@ static void scale_internal_short(GLint components, GLint widthin,
GLint ysize, GLint group_size, GLint ysize, GLint group_size,
GLint myswap_bytes) GLint myswap_bytes)
{ {
float x, convx; float convx;
float y, convy; float convy;
float percent; float percent;
/* Max components in a format is 4, so... */ /* Max components in a format is 4, so... */
float totals[4]; float totals[4];
@ -2367,8 +2367,8 @@ static void scale_internal_uint(GLint components, GLint widthin,
GLint ysize, GLint group_size, GLint ysize, GLint group_size,
GLint myswap_bytes) GLint myswap_bytes)
{ {
float x, convx; float convx;
float y, convy; float convy;
float percent; float percent;
/* Max components in a format is 4, so... */ /* Max components in a format is 4, so... */
float totals[4]; float totals[4];
@ -2651,8 +2651,8 @@ static void scale_internal_int(GLint components, GLint widthin,
GLint ysize, GLint group_size, GLint ysize, GLint group_size,
GLint myswap_bytes) GLint myswap_bytes)
{ {
float x, convx; float convx;
float y, convy; float convy;
float percent; float percent;
/* Max components in a format is 4, so... */ /* Max components in a format is 4, so... */
float totals[4]; float totals[4];
@ -2944,8 +2944,8 @@ static void scale_internal_float(GLint components, GLint widthin,
GLint ysize, GLint group_size, GLint ysize, GLint group_size,
GLint myswap_bytes) GLint myswap_bytes)
{ {
float x, convx; float convx;
float y, convy; float convy;
float percent; float percent;
/* Max components in a format is 4, so... */ /* Max components in a format is 4, so... */
float totals[4]; float totals[4];
@ -3517,7 +3517,6 @@ int gluBuild1DMipmapLevelsCore(GLenum target, GLint internalFormat,
GLushort *otherImage; GLushort *otherImage;
GLushort *imageTemp; GLushort *imageTemp;
GLint memreq; GLint memreq;
GLint maxsize;
GLint cmpts; GLint cmpts;
PixelStorageModes psm; PixelStorageModes psm;
@ -3664,7 +3663,6 @@ static int bitmapBuild2DMipmaps(GLenum target, GLint internalFormat,
GLushort *otherImage; GLushort *otherImage;
GLushort *imageTemp; GLushort *imageTemp;
GLint memreq; GLint memreq;
GLint maxsize;
GLint cmpts; GLint cmpts;
PixelStorageModes psm; PixelStorageModes psm;
@ -3771,11 +3769,8 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
GLint level, levels; GLint level, levels;
const void *usersImage; /* passed from user. Don't touch! */ const void *usersImage; /* passed from user. Don't touch! */
void *srcImage, *dstImage; /* scratch area to build mipmapped images */ void *srcImage, *dstImage; /* scratch area to build mipmapped images */
GLint newImage_width;
GLint newImage_height;
__GLU_INIT_SWAP_IMAGE; __GLU_INIT_SWAP_IMAGE;
GLint memreq; GLint memreq;
GLint maxsize;
GLint cmpts; GLint cmpts;
GLint myswap_bytes, groups_per_line, element_size, group_size; GLint myswap_bytes, groups_per_line, element_size, group_size;
@ -4588,7 +4583,6 @@ static int fastBuild2DMipmaps(const PixelStorageModes *psm,
GLubyte *otherImage; GLubyte *otherImage;
GLubyte *imageTemp; GLubyte *imageTemp;
GLint memreq; GLint memreq;
GLint maxsize;
GLint cmpts; GLint cmpts;
@ -5979,8 +5973,8 @@ static void scaleInternalPackedPixel(int components,
GLint pixelSizeInBytes, GLint pixelSizeInBytes,
GLint rowSizeInBytes,GLint isSwap) GLint rowSizeInBytes,GLint isSwap)
{ {
float x, convx; float convx;
float y, convy; float convy;
float percent; float percent;
/* Max components in a format is 4, so... */ /* Max components in a format is 4, so... */
@ -5991,7 +5985,6 @@ static void scaleInternalPackedPixel(int components,
int i,j,k,xindex; int i,j,k,xindex;
const char *temp, *temp0; const char *temp, *temp0;
const char *temp_index;
int outindex; int outindex;
int lowx_int, highx_int, lowy_int, highy_int; int lowx_int, highx_int, lowy_int, highy_int;
@ -7308,6 +7301,7 @@ static void emptyImage3D(const PixelStorageModes *psm,
psm->unpack_skip_images * imageSize] ); psm->unpack_skip_images * imageSize] );
} /* emptyImage3D() */ } /* emptyImage3D() */
static
int gluScaleImage3D(GLenum format, int gluScaleImage3D(GLenum format,
GLint widthIn, GLint heightIn, GLint depthIn, GLint widthIn, GLint heightIn, GLint depthIn,
GLenum typeIn, const void *dataIn, GLenum typeIn, const void *dataIn,
@ -7361,6 +7355,7 @@ int gluScaleImage3D(GLenum format,
return 0; return 0;
} /* gluScaleImage3D() */ } /* gluScaleImage3D() */
static void closestFit3D(GLenum target, GLint width, GLint height, GLint depth, static void closestFit3D(GLenum target, GLint width, GLint height, GLint depth,
GLint internalFormat, GLenum format, GLenum type, GLint internalFormat, GLenum format, GLenum type,
GLint *newWidth, GLint *newHeight, GLint *newDepth) GLint *newWidth, GLint *newHeight, GLint *newDepth)
@ -7434,7 +7429,6 @@ static void halveImagePackedPixelSlice(int components,
int halfHeight= height / 2; int halfHeight= height / 2;
int halfDepth= depth / 2; int halfDepth= depth / 2;
const char *src= (const char *)dataIn; const char *src= (const char *)dataIn;
int padBytes= rowSizeInBytes - (width * pixelSizeInBytes);
int outIndex= 0; int outIndex= 0;
assert((width == 1 || height == 1) && depth >= 2); assert((width == 1 || height == 1) && depth >= 2);
@ -7690,10 +7684,8 @@ static int gluBuild3DMipmapLevelsCore(GLenum target, GLint internalFormat,
GLint level, levels; GLint level, levels;
const void *usersImage; const void *usersImage;
void *srcImage, *dstImage; void *srcImage, *dstImage;
GLint newImageWidth, newImageHeight, newImageDepth;
__GLU_INIT_SWAP_IMAGE; __GLU_INIT_SWAP_IMAGE;
GLint memReq; GLint memReq;
GLint maxSize;
GLint cmpts; GLint cmpts;
GLint myswapBytes, groupsPerLine, elementSize, groupSize; GLint myswapBytes, groupsPerLine, elementSize, groupSize;

View file

@ -31,8 +31,8 @@
** published by SGI, but has not been independently verified as being ** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification. ** compliant with the OpenGL(R) version 1.2.1 Specification.
** **
** $Date: 2001/09/18 16:39:38 $ $Revision: 1.4 $ ** $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.4 2001/09/18 16:39:38 kschultz Exp $ ** $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" #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 centery, GLdouble centerz, GLdouble upx, GLdouble upy,
GLdouble upz) GLdouble upz)
{ {
int i;
float forward[3], side[3], up[3]; float forward[3], side[3], up[3];
GLfloat m[4][4]; GLfloat m[4][4];

View file

@ -31,8 +31,8 @@
** published by SGI, but has not been independently verified as being ** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification. ** compliant with the OpenGL(R) version 1.2.1 Specification.
** **
** $Date: 2001/09/20 21:47:52 $ $Revision: 1.2 $ ** $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.2 2001/09/20 21:47:52 kschultz Exp $ ** $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" #include "gluos.h"
@ -156,7 +156,7 @@ void GLAPIENTRY
gluCylinder(GLUquadric *qobj, GLdouble baseRadius, GLdouble topRadius, gluCylinder(GLUquadric *qobj, GLdouble baseRadius, GLdouble topRadius,
GLdouble height, GLint slices, GLint stacks) GLdouble height, GLint slices, GLint stacks)
{ {
GLint i,j,max; GLint i,j;
GLfloat sinCache[CACHE_SIZE]; GLfloat sinCache[CACHE_SIZE];
GLfloat cosCache[CACHE_SIZE]; GLfloat cosCache[CACHE_SIZE];
GLfloat sinCache2[CACHE_SIZE]; GLfloat sinCache2[CACHE_SIZE];
@ -164,7 +164,7 @@ gluCylinder(GLUquadric *qobj, GLdouble baseRadius, GLdouble topRadius,
GLfloat sinCache3[CACHE_SIZE]; GLfloat sinCache3[CACHE_SIZE];
GLfloat cosCache3[CACHE_SIZE]; GLfloat cosCache3[CACHE_SIZE];
GLfloat angle; GLfloat angle;
GLfloat x, y, zLow, zHigh; GLfloat zLow, zHigh;
GLfloat sintemp, costemp; GLfloat sintemp, costemp;
GLfloat length; GLfloat length;
GLfloat deltaRadius; GLfloat deltaRadius;
@ -438,11 +438,10 @@ gluPartialDisk(GLUquadric *qobj, GLdouble innerRadius,
GLdouble outerRadius, GLint slices, GLint loops, GLdouble outerRadius, GLint slices, GLint loops,
GLdouble startAngle, GLdouble sweepAngle) GLdouble startAngle, GLdouble sweepAngle)
{ {
GLint i,j,max; GLint i,j;
GLfloat sinCache[CACHE_SIZE]; GLfloat sinCache[CACHE_SIZE];
GLfloat cosCache[CACHE_SIZE]; GLfloat cosCache[CACHE_SIZE];
GLfloat angle; GLfloat angle;
GLfloat x, y;
GLfloat sintemp, costemp; GLfloat sintemp, costemp;
GLfloat deltaRadius; GLfloat deltaRadius;
GLfloat radiusLow, radiusHigh; GLfloat radiusLow, radiusHigh;
@ -700,7 +699,7 @@ gluPartialDisk(GLUquadric *qobj, GLdouble innerRadius,
void GLAPIENTRY void GLAPIENTRY
gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks) gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks)
{ {
GLint i,j,max; GLint i,j;
GLfloat sinCache1a[CACHE_SIZE]; GLfloat sinCache1a[CACHE_SIZE];
GLfloat cosCache1a[CACHE_SIZE]; GLfloat cosCache1a[CACHE_SIZE];
GLfloat sinCache2a[CACHE_SIZE]; GLfloat sinCache2a[CACHE_SIZE];
@ -714,11 +713,9 @@ gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks)
GLfloat sinCache3b[CACHE_SIZE]; GLfloat sinCache3b[CACHE_SIZE];
GLfloat cosCache3b[CACHE_SIZE]; GLfloat cosCache3b[CACHE_SIZE];
GLfloat angle; GLfloat angle;
GLfloat x, y, zLow, zHigh; GLfloat zLow, zHigh;
GLfloat sintemp1, sintemp2, sintemp3, sintemp4; GLfloat sintemp1, sintemp2, sintemp3, sintemp4;
GLfloat costemp1, costemp2, costemp3, costemp4; GLfloat costemp1, costemp2, costemp3, costemp4;
GLfloat zNormal;
GLfloat xyNormalRatio;
GLboolean needCache2, needCache3; GLboolean needCache2, needCache3;
GLint start, finish; GLint start, finish;