diff options
author | Brian Paul <[email protected]> | 2004-05-12 15:29:36 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-05-12 15:29:36 +0000 |
commit | f1cfb4b7a79c38a6c03795eb5e3dd9076e51d9ef (patch) | |
tree | 28ae042f21f2381af242e57125090913d70e9105 /src/glu/sgi/libnurbs/internals | |
parent | 2e66f7eef79610675d66624aba97190ecca26299 (diff) |
fix compiler warnings (Jerome Glisse)
Diffstat (limited to 'src/glu/sgi/libnurbs/internals')
-rw-r--r-- | src/glu/sgi/libnurbs/internals/arctess.cc | 4 | ||||
-rw-r--r-- | src/glu/sgi/libnurbs/internals/backend.cc | 12 | ||||
-rw-r--r-- | src/glu/sgi/libnurbs/internals/bin.cc | 6 | ||||
-rw-r--r-- | src/glu/sgi/libnurbs/internals/bufpool.cc | 9 | ||||
-rw-r--r-- | src/glu/sgi/libnurbs/internals/curve.cc | 5 | ||||
-rw-r--r-- | src/glu/sgi/libnurbs/internals/intersect.cc | 9 | ||||
-rw-r--r-- | src/glu/sgi/libnurbs/internals/mapdescv.cc | 8 | ||||
-rw-r--r-- | src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc | 6 |
8 files changed, 36 insertions, 23 deletions
diff --git a/src/glu/sgi/libnurbs/internals/arctess.cc b/src/glu/sgi/libnurbs/internals/arctess.cc index 0ea84152ec4..e633626de06 100644 --- a/src/glu/sgi/libnurbs/internals/arctess.cc +++ b/src/glu/sgi/libnurbs/internals/arctess.cc @@ -378,7 +378,9 @@ ArcTessellator::tessellateNonlinear( Arc *arc, REAL geo_stepsize, REAL arc_steps /* strength reduction on p = dp * step would introduce error */ int step; +#ifndef NOELIMINATION int ocanremove = 0; +#endif register long order = bezierArc->order; for( step=1, ++vert; step<nsteps; step++, vert++ ) { register REAL p = dp * step; @@ -439,7 +441,9 @@ ArcTessellator::tessellateNonlinear( Arc *arc, REAL geo_stepsize, REAL arc_steps /* strength reduction on p = dp * step would introduce error */ int step; +#ifndef NOELIMINATION int ocanremove = 0; +#endif register long order = bezierArc->order; for( step=1, ++vert; step<nsteps; step++, vert++ ) { register REAL p = dp * step; diff --git a/src/glu/sgi/libnurbs/internals/backend.cc b/src/glu/sgi/libnurbs/internals/backend.cc index 6367bf45f94..97775a97684 100644 --- a/src/glu/sgi/libnurbs/internals/backend.cc +++ b/src/glu/sgi/libnurbs/internals/backend.cc @@ -35,8 +35,8 @@ /* * backend.c++ * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/backend.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ + * $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ + * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/backend.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ */ /* Bezier surface backend @@ -326,7 +326,9 @@ void Backend::tmeshvert( TrimVertex *t ) { +#ifndef NOWIREFRAME const long nuid = t->nuid; +#endif const REAL u = t->param[0]; const REAL v = t->param[1]; @@ -365,11 +367,9 @@ Backend::tmeshvert( TrimVertex *t ) void Backend::tmeshvert( REAL u, REAL v ) { - - const long nuid = 0; - - #ifndef NOWIREFRAME + const long nuid = 0; + npts++; if( wireframetris ) { if( npts >= 3 ) { diff --git a/src/glu/sgi/libnurbs/internals/bin.cc b/src/glu/sgi/libnurbs/internals/bin.cc index d08bd52e699..5efda2dd38d 100644 --- a/src/glu/sgi/libnurbs/internals/bin.cc +++ b/src/glu/sgi/libnurbs/internals/bin.cc @@ -35,8 +35,8 @@ /* * bin.c++ * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bin.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ + * $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ + * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bin.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ */ #include "glimports.h" @@ -154,12 +154,12 @@ Bin::listBezier( void ) for( Arc_ptr jarc=firstarc(); jarc; jarc=nextarc() ) { if( jarc->isbezier( ) ) { assert( jarc->pwlArc->npts == 2 ); +#ifndef NDEBUG TrimVertex *pts = jarc->pwlArc->pts; REAL s1 = pts[0].param[0]; REAL t1 = pts[0].param[1]; REAL s2 = pts[1].param[0]; REAL t2 = pts[1].param[1]; -#ifndef NDEBUG dprintf( "arc (%g,%g) (%g,%g)\n", s1, t1, s2, t2 ); #endif } diff --git a/src/glu/sgi/libnurbs/internals/bufpool.cc b/src/glu/sgi/libnurbs/internals/bufpool.cc index 4e4578fe924..d8d9c23db31 100644 --- a/src/glu/sgi/libnurbs/internals/bufpool.cc +++ b/src/glu/sgi/libnurbs/internals/bufpool.cc @@ -35,8 +35,8 @@ /* * bufpool.c++ * - * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bufpool.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ + * $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ + * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bufpool.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ */ #include "glimports.h" @@ -50,7 +50,10 @@ */ Pool::Pool( int _buffersize, int initpoolsize, char *n ) { - buffersize= (_buffersize < sizeof(Buffer)) ? sizeof(Buffer) : _buffersize; + if((unsigned)_buffersize < sizeof(Buffer)) + buffersize = sizeof(Buffer); + else + buffersize = _buffersize; initsize = initpoolsize * buffersize; nextsize = initsize; name = n; diff --git a/src/glu/sgi/libnurbs/internals/curve.cc b/src/glu/sgi/libnurbs/internals/curve.cc index 5a5bc1770c1..5517afa2db4 100644 --- a/src/glu/sgi/libnurbs/internals/curve.cc +++ b/src/glu/sgi/libnurbs/internals/curve.cc @@ -35,8 +35,8 @@ /* * curve.c++ * - * $Date: 2001/08/13 16:52:18 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/curve.cc,v 1.2 2001/08/13 16:52:18 brianp Exp $ + * $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $ + * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/curve.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $ */ #include "glimports.h" @@ -67,7 +67,6 @@ Curve::Curve( Quilt_ptr geo, REAL pta, REAL ptb, Curve *c ) Quiltspec_ptr qs = geo->qspec; ps += qs->offset; ps += qs->index * qs->order * qs->stride; - REAL *pend = ps + qs->order * qs->stride; if( needsSampling ) mapdesc->xformSampling( ps, qs->order, qs->stride, spts, stride ); diff --git a/src/glu/sgi/libnurbs/internals/intersect.cc b/src/glu/sgi/libnurbs/internals/intersect.cc index 2d69224b2ae..118810a0da1 100644 --- a/src/glu/sgi/libnurbs/internals/intersect.cc +++ b/src/glu/sgi/libnurbs/internals/intersect.cc @@ -35,8 +35,8 @@ /* * intersect.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/intersect.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ + * $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 $ */ #include "glimports.h" @@ -175,7 +175,7 @@ int Subdivider::arc_split( Arc_ptr jarc, int param, REAL value, int dir ) { int maxvertex = jarc->pwlArc->npts; - Arc_ptr jarc1, jarc2, jarc3; + Arc_ptr jarc1; TrimVertex* v = jarc->pwlArc->pts; int loc[3]; @@ -258,7 +258,8 @@ Subdivider::arc_split( Arc_ptr jarc, int param, REAL value, int dir ) #endif //not NOTDEF // JEB: This is the original version: #ifdef NOTDEF - + Arc_ptr jarc2, jarc3; + TrimVertex *newjunk = trimvertexpool.get(3); v[i].nuid = jarc->nuid; v[j].nuid = jarc->nuid; diff --git a/src/glu/sgi/libnurbs/internals/mapdescv.cc b/src/glu/sgi/libnurbs/internals/mapdescv.cc index 3d18b47b112..6e4bb40c90f 100644 --- a/src/glu/sgi/libnurbs/internals/mapdescv.cc +++ b/src/glu/sgi/libnurbs/internals/mapdescv.cc @@ -35,8 +35,8 @@ /* * mapdescv.c++ * - * $Date: 2001/08/13 16:52:18 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mapdescv.cc,v 1.2 2001/08/13 16:52:18 brianp Exp $ + * $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $ + * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mapdescv.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $ */ #include "glimports.h" @@ -127,12 +127,16 @@ Mapdesc::calcPartialVelocity ( REAL *mp = &mag[0][0]; const int istride = sizeof( tmp[0]) / sizeof( tmp[0][0][0] ); const int jstride = sizeof( tmp[0][0]) / sizeof( tmp[0][0][0] ); + /* const int kstride = sizeof( tmp[0][0][0]) / sizeof( tmp[0][0][0] ); + */ const int mistride = sizeof( mag[0]) / sizeof( mag[0][0] ); const int mjstride = sizeof( mag[0][0]) / sizeof( mag[0][0] ); const int idist = nrows * istride; const int jdist = ncols * jstride; + /* const int kdist = inhcoords * kstride; + */ const int id = idist - spartial * istride; const int jd = jdist - tpartial * jstride; diff --git a/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc b/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc index b2a82d0ae26..111b8bea488 100644 --- a/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc +++ b/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc @@ -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: 2004/05/12 15:29:36 $ $Revision: 1.2 $ */ /* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.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/internals/monoTriangulationBackend.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ */ #include "monoTriangulation.h" @@ -45,7 +45,9 @@ void reflexChain::outputFan(Real v[2], Backend* backend) { Int i; + /* TrimVertex trimVert; + */ backend->bgntfan(); /* |