silence a bunch of compiler warnings

This commit is contained in:
Brian Paul 2005-10-28 13:09:23 +00:00
parent 5222c58a68
commit ca33e21165
14 changed files with 69 additions and 38 deletions

View file

@ -57,7 +57,9 @@
static void normalize(float vec[3]);
static void crossProduct(float x[3], float y[3], float ret[3]);
#if 0 // UNUSED
static void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[]);
#endif
static float binomialCoefficients[8][8] = {
{1,0,0,0,0,0,0,0},
@ -91,7 +93,7 @@ void bezierCurveEval(float u0, float u1, int order, float *ctlpoints, int stride
}
#if 0 // UNUSED
/*order = degree +1 >=1.
*/
void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[])
@ -115,7 +117,7 @@ void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int st
for(j=0; j<dimension; j++)
retpoint[j] = buf[order-1][0][j];
}
#endif
/*order = degree +1 >=1.

View file

@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
** $Date: 2005/10/28 13:09:23 $ $Revision: 1.2 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/dataTransform.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/dataTransform.cc,v 1.2 2005/10/28 13:09:23 brianp Exp $
*/
#include <stdlib.h>
@ -47,6 +47,7 @@
extern directedLine* arcLoopToDLineLoop(Arc_ptr loop);
#if 0 // UNUSED
static directedLine* copy_loop(Arc_ptr loop, Real2* vertArray, int& index, directedLine dline_buf[], sampledLine sline_buf[], int& index_dline)
{
directedLine *ret;
@ -95,7 +96,9 @@ static directedLine* copy_loop(Arc_ptr loop, Real2* vertArray, int& index, direc
}
return ret;
}
#endif
#if 0 // UNUSED
static int num_edges(Bin& bin)
{
int sum=0;
@ -103,6 +106,8 @@ static int num_edges(Bin& bin)
sum += jarc->pwlArc->npts-1;
return sum;
}
#endif
/*
directedLine* bin_to_DLineLoops(Bin& bin)
{

View file

@ -35,8 +35,8 @@
/*
* intersect.c++
*
* $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/intersect.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
* $Date: 2005/10/28 13:09:23 $ $Revision: 1.3 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/intersect.cc,v 1.3 2005/10/28 13:09:23 brianp Exp $
*/
#include "glimports.h"
@ -53,7 +53,9 @@
enum i_result { INTERSECT_VERTEX, INTERSECT_EDGE };
/* local functions */
#ifndef NDEBUG // for asserts only
static int arc_classify( Arc_ptr, int, REAL );
#endif
static enum i_result pwlarc_intersect( PwlArc *, int, REAL, int, int[3] );
@ -400,6 +402,7 @@ pwlarc_intersect(
*----------------------------------------------------------------------------
*/
#ifndef NDEBUG // for asserts only
static int
arc_classify( Arc_ptr jarc, int param, REAL value )
{
@ -438,6 +441,7 @@ arc_classify( Arc_ptr jarc, int param, REAL value )
}
}
}
#endif
void
Subdivider::classify_tailonleft_s( Bin& bin, Bin& in, Bin& out, REAL val )

View file

@ -35,8 +35,8 @@
/*
* maplist.c++
*
* $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/maplist.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
* $Date: 2005/10/28 13:09:23 $ $Revision: 1.2 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/maplist.cc,v 1.2 2005/10/28 13:09:23 brianp Exp $
*/
#include "glimports.h"
@ -73,8 +73,10 @@ Maplist::add( long type, int israt, int ncoords )
void
Maplist::define( long type, int israt, int ncoords )
{
#ifndef NDEBUG // to avoid warning
Mapdesc *m = locate( type );
assert( m == NULL || ( m->isrational == israt && m->ncoords == ncoords ) );
#endif
add( type, israt, ncoords );
}

View file

@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $
** $Date: 2005/10/28 13:09:23 $ $Revision: 1.3 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc,v 1.3 2005/10/28 13:09:23 brianp Exp $
*/
#include "monoTriangulation.h"
@ -86,7 +86,7 @@ void reflexChain::processNewVertex(Real v[2], Backend* backend)
{
Int i,j,k;
Int isReflex;
TrimVertex trimVert;
/*TrimVertex trimVert;*/
/*if there are at most one vertex in the queue, then simply insert
*/
if(index_queue <=1){

View file

@ -35,8 +35,8 @@
/*
* slicer.c++
*
* $Date: 2002/11/01 23:35:07 $ $Revision: 1.4 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/slicer.cc,v 1.4 2002/11/01 23:35:07 brianp Exp $
* $Date: 2005/10/28 13:09:23 $ $Revision: 1.5 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/slicer.cc,v 1.5 2005/10/28 13:09:23 brianp Exp $
*/
#include <stdlib.h>
@ -84,6 +84,7 @@ Int num_quads = 0;
#define ZERO 0.00001 /*determing whether a loop is a rectngle or not*/
#define equalRect(a,b) ((glu_abs(a-b) <= ZERO)? 1:0) //only used in tessellating a rectangle
#if 0 // UNUSED
static Int is_Convex(Arc_ptr loop)
{
if(area(loop->tail(), loop->head(), loop->next->head()) <0 )
@ -95,9 +96,11 @@ static Int is_Convex(Arc_ptr loop)
}
return 1;
}
#endif
/******triangulate a monotone polygon**************/
#include "monoTriangulation.h"
#if 0 // UNUSED
static int is_U_monotone(Arc_ptr loop)
{
int n_changes=0;
@ -126,6 +129,7 @@ static int is_U_monotone(Arc_ptr loop)
else
return 0;
}
#endif
inline int compInY(REAL a[2], REAL b[2])
{
@ -259,6 +263,7 @@ if(loop->next->tail()[1] == loop->next->head()[1])
//a line with the same u for opt
#ifdef USE_OPTTT
static void evalLineNOGE_BU(TrimVertex *verts, int n, Backend& backend)
{
int i;
@ -266,8 +271,10 @@ static void evalLineNOGE_BU(TrimVertex *verts, int n, Backend& backend)
for(i=0; i<n; i++)
backend.tmeshvertNOGE_BU(&verts[i]);
}
#endif
//a line with the same v for opt
#ifdef USE_OPTTT
static void evalLineNOGE_BV(TrimVertex *verts, int n, Backend& backend)
{
int i;
@ -276,6 +283,9 @@ static void evalLineNOGE_BV(TrimVertex *verts, int n, Backend& backend)
for(i=0; i<n; i++)
backend.tmeshvertNOGE_BV(&verts[i]);
}
#endif
#ifdef USE_OPTTT
static void evalLineNOGE(TrimVertex *verts, int n, Backend& backend)
{
@ -290,7 +300,7 @@ static void evalLineNOGE(TrimVertex *verts, int n, Backend& backend)
backend.tmeshvertNOGE(&verts[i]);
}
}
#endif
inline void OPT_OUTVERT(TrimVertex& vv, Backend& backend)
{
@ -861,6 +871,7 @@ return;
/**********for reading newtess_flag from a file**********/
#ifdef USE_READ_FLAG
static Int read_flag(char* name)
{
Int ret;
@ -874,7 +885,7 @@ static Int read_flag(char* name)
fclose(fp);
return ret;
}
#endif
/***********nextgen tess****************/
#include "sampleMonoPoly.h"

View file

@ -35,8 +35,8 @@
/*
* trimline.c++
*
* $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimline.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
* $Date: 2005/10/28 13:09:23 $ $Revision: 1.2 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimline.cc,v 1.2 2005/10/28 13:09:23 brianp Exp $
*/
#include "glimports.h"
@ -162,10 +162,11 @@ Trimline::getNextPts( Arc_ptr botarc )
{
reset(); swap(); append( tinterp );
#ifndef NDEBUG
PwlArc *lastpwl = botarc->prev->pwlArc;
TrimVertex *lastpt1 = &lastpwl->pts[lastpwl->npts-1];
#endif
TrimVertex *lastpt2 = botarc->pwlArc->pts;
register TrimVertex *p = jarcl.getnextpt();
for( append( p ); p != lastpt2; append( p ) ) {
assert( p != lastpt1 );
@ -180,7 +181,9 @@ Trimline::getPrevPts( Arc_ptr botarc )
PwlArc *lastpwl = botarc->prev->pwlArc;
TrimVertex *lastpt1 = &lastpwl->pts[lastpwl->npts-1];
#ifndef NDEBUG
TrimVertex *lastpt2 = botarc->pwlArc->pts;
#endif
register TrimVertex *q = jarcl.getprevpt();
for( append( q ); q != lastpt1; append( q ) ) {

View file

@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $
** $Date: 2005/10/28 13:09:23 $ $Revision: 1.3 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.cc,v 1.3 2005/10/28 13:09:23 brianp Exp $
*/
#include "gluos.h"
@ -61,6 +61,7 @@ extern Int isCusp(directedLine *v);
extern Int deleteRepeatDiagonals(Int num_diagonals, directedLine** diagonal_vertices, directedLine** new_vertices);
//for debug purpose only
#if 0 // UNUSED
static void drawDiagonals(Int num_diagonals, directedLine** diagonal_vertices)
{
Int i;
@ -72,6 +73,7 @@ static void drawDiagonals(Int num_diagonals, directedLine** diagonal_vertices)
glEnd();
}
}
#endif
/*given (x_1, y_1) and (x_2, y_2), and y
*return x such that (x,y) is on the line

View file

@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $
** $Date: 2005/10/28 13:09:23 $ $Revision: 1.4 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.4 2005/10/28 13:09:23 brianp Exp $
*/
#include <stdlib.h>
@ -1037,8 +1037,8 @@ void monoTriangulationRec(directedLine* inc_chain, Int inc_index,
primStream* pStream)
{
Int i;
directedLine *temp, *oldtemp;
Int tempIndex, oldtempIndex;
directedLine *temp, *oldtemp = NULL;
Int tempIndex, oldtempIndex = 0;
assert(inc_chain != NULL && dec_chain != NULL);

View file

@ -621,6 +621,7 @@ directedLine* DBG_cutIntersectionPoly(directedLine *polygon, int& cutOccur)
//given a polygon, cut the edges off and finally obtain a
//a polygon without intersections. The cut-off edges are
//dealloated. The new polygon is returned.
#if 0 // UNUSED
static directedLine* DBG_cutIntersectionPoly_notwork(directedLine *polygon)
{
directedLine *crt;//current polygon
@ -673,6 +674,7 @@ static directedLine* DBG_cutIntersectionPoly_notwork(directedLine *polygon)
find = 0; //go to next loop
}
}
#endif
directedLine* DBG_cutIntersectionAllPoly(directedLine* list)
{

View file

@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
** $Date: 2005/10/28 13:09:23 $ $Revision: 1.2 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc,v 1.2 2005/10/28 13:09:23 brianp Exp $
*/
#include <stdlib.h>
@ -159,7 +159,7 @@ void sampleCompLeft(Real* topVertex, Real* botVertex,
*/
Int midIndex1;
Int midIndex2;
Int gridMidIndex1, gridMidIndex2;
Int gridMidIndex1 = 0, gridMidIndex2 = 0;
//midIndex1: array[i] <= v, array[i-1] > v
//midIndex2: array[i] >= v, array[i+1] < v
// v(gridMidIndex1) >= v(midindex1) > v(gridMidIndex1+1)

View file

@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2001/03/22 11:41:40 $ $Revision: 1.2 $
** $Date: 2005/10/28 13:09:23 $ $Revision: 1.3 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.2 2001/03/22 11:41:40 joukj Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.3 2005/10/28 13:09:23 brianp Exp $
*/
#include <stdlib.h>
@ -72,7 +72,7 @@ void sampleCompRight(Real* topVertex, Real* botVertex,
*/
Int midIndex1;
Int midIndex2;
Int gridMidIndex1, gridMidIndex2;
Int gridMidIndex1, gridMidIndex2 = 0;
//midIndex1: array[i] <= v, array[i+1] > v
//midIndex2: array[i] >= v, array[i+1] < v
midIndex1 = rightChain->findIndexBelowGen(rightGridChain->get_v_value(gridIndex1),

View file

@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2004/05/12 15:29:36 $ $Revision: 1.4 $
** $Date: 2005/10/28 13:09:23 $ $Revision: 1.5 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.4 2004/05/12 15:29:36 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.5 2005/10/28 13:09:23 brianp Exp $
*/
#include "gluos.h"
@ -976,7 +976,7 @@ void findNeck(vertexArray *leftChain, Int botLeftIndex,
void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_innerIndices)
{
Int i,k,isHoriz;
Int i,k,isHoriz = 0;
Int n_ulines = grid->get_n_ulines();
Real uMin = grid->get_u_min();
Real uMax = grid->get_u_max();
@ -984,7 +984,7 @@ void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGrid
Real vMin = grid->get_v_min();
Real vMax = grid->get_v_max();
*/
Real slop, uinterc;
Real slop = 0.0, uinterc;
#ifdef SHORTEN_GRID_LINE
//uintercBuf stores all the interction u value for each grid line
@ -1102,7 +1102,7 @@ void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGri
Real vMin = grid->get_v_min();
Real vMax = grid->get_v_max();
*/
Real slop, uinterc;
Real slop = 0.0, uinterc;
#ifdef SHORTEN_GRID_LINE
//uintercBuf stores all the interction u value for each grid line

View file

@ -444,7 +444,7 @@ gluPartialDisk(GLUquadric *qobj, GLdouble innerRadius,
GLfloat sintemp, costemp;
GLfloat deltaRadius;
GLfloat radiusLow, radiusHigh;
GLfloat texLow, texHigh;
GLfloat texLow = 0.0, texHigh = 0.0;
GLfloat angleOffset;
GLint slices2;
GLint finish;
@ -713,8 +713,8 @@ gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks)
GLfloat cosCache3b[CACHE_SIZE];
GLfloat angle;
GLfloat zLow, zHigh;
GLfloat sintemp1, sintemp2, sintemp3, sintemp4;
GLfloat costemp1, costemp2, costemp3, costemp4;
GLfloat sintemp1, sintemp2, sintemp3 = 0.0, sintemp4 = 0.0;
GLfloat costemp1, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
GLboolean needCache2, needCache3;
GLint start, finish;