fix compiler warnings (Jerome Glisse)
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 12 May 2004 15:29:36 +0000 (15:29 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 12 May 2004 15:29:36 +0000 (15:29 +0000)
16 files changed:
src/glu/sgi/libnurbs/interface/glcurveval.cc
src/glu/sgi/libnurbs/interface/glsurfeval.cc
src/glu/sgi/libnurbs/interface/incurveeval.cc
src/glu/sgi/libnurbs/interface/insurfeval.cc
src/glu/sgi/libnurbs/internals/arctess.cc
src/glu/sgi/libnurbs/internals/backend.cc
src/glu/sgi/libnurbs/internals/bin.cc
src/glu/sgi/libnurbs/internals/bufpool.cc
src/glu/sgi/libnurbs/internals/curve.cc
src/glu/sgi/libnurbs/internals/intersect.cc
src/glu/sgi/libnurbs/internals/mapdescv.cc
src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc
src/glu/sgi/libnurbs/nurbtess/monoChain.cc
src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc
src/glu/sgi/libnurbs/nurbtess/polyDBG.cc
src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc

index 8c865084209cb032e9e55a3912f38acd387adfe5..4713dc4672267b3510ac7c3b6bf5cb74c8486269 100644 (file)
@@ -35,8 +35,8 @@
 /*
  * glcurveval.c++
  *
- * $Date: 2003/04/30 15:20:37 $ $Revision: 1.5 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glcurveval.cc,v 1.5 2003/04/30 15:20:37 brianp Exp $
+ * $Date: 2004/05/12 15:29:36 $ $Revision: 1.6 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glcurveval.cc,v 1.6 2004/05/12 15:29:36 brianp Exp $
  */
 
 /* Polynomial Evaluator Interface */
@@ -208,8 +208,8 @@ OpenGLCurveEvaluator::map1f(
 {
   if(output_triangles)
     {
-      int dimension;
-      int which;
+      int dimension = 0;
+      int which = 0;
       switch(type){
       case GL_MAP1_VERTEX_3:
        which = 0;
index 0a4f18dcffdbf9122c7cc11e1bda55461c4a8a2c..cb2cf8ee0be546929fbc11da3e33739d78323169 100644 (file)
@@ -970,7 +970,6 @@ if(output_triangles)
 
   REAL du, dv;
   long i,j;
-  long row;
   if(global_grid_nu == 0 || global_grid_nv == 0)
     return; /*no points need to be output*/
   du = (global_grid_u1 - global_grid_u0) / (REAL)global_grid_nu;
index 5c4553c98b54f954dbd1bda915f82504ec37079c..336cca0508e49a87736db8608c655f16a0ceebf5 100644 (file)
 ** 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: 2004/05/12 15:29:36 $ $Revision: 1.2 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/incurveeval.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/interface/incurveeval.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
 */
 
 #include <stdlib.h>
@@ -97,7 +97,7 @@ void OpenGLCurveEvaluator::inMap1f(int which, //0: vert, 1: norm, 2: color, 3: t
                                   int uorder,
                                   REAL *ctlpoints)
 {
-  int i,j,x;
+  int i,x;
   curveEvalMachine *temp_em;
   switch(which){
   case 0: //vertex
@@ -139,7 +139,6 @@ void OpenGLCurveEvaluator::inDoDomain1(curveEvalMachine *em, REAL u, REAL *retPo
 {
   int j, row;
   REAL the_uprime;
-  REAL p;
   REAL *data;
   
   if(em->u2 == em->u1)
index 58af2bcb63f609ba6a4433bd46995d6e83f19cc4..b314699c7af2c53f010943ed65d0ebddbd88411c 100644 (file)
 ** published by SGI, but has not been independently verified as being
 ** compliant with the OpenGL(R) version 1.2.1 Specification.
 **
-** $Date: 2002/03/23 02:29:37 $ $Revision: 1.2 $
+** $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/insurfeval.cc,v 1.2 2002/03/23 02:29:37 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/insurfeval.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $
 */
 
 #include "gluos.h"
@@ -403,7 +403,6 @@ void OpenGLSurfaceEvaluator::inEvalMesh2(int lowU, int lowV, int highU, int high
 {
   REAL du, dv;
   int i,j;
-  int row;
   REAL point[4];
   REAL normal[3];
   if(global_grid_nu == 0 || global_grid_nv == 0)
@@ -874,7 +873,7 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsBU(int k, REAL u, REAL v,
                                                      REAL *baseData,
                                                      REAL *retPoint, REAL* retdu, REAL *retdv)
 {
-  int j, row, col;
+  int j, col;
 
   REAL vprime;
 
@@ -909,7 +908,7 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsBV(int k, REAL u, REAL v,
                                                      REAL *baseData,
                                                      REAL *retPoint, REAL* retdu, REAL *retdv)
 {
-  int j, row, col;
+  int j, row;
   REAL uprime;
 
 
@@ -1828,7 +1827,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2EM(REAL u, REAL v)
 
 void OpenGLSurfaceEvaluator::inBPMEvalEM(bezierPatchMesh* bpm)
 {
-  int i,j,k,l;
+  int i,j,k;
   float u,v;
 
   int ustride;
index 0ea84152ec4a5d6ca967d0a1adc62f515fe8bebb..e633626de06b2d8dfa9a22579b40336d7f7fa392 100644 (file)
@@ -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;
index 6367bf45f94cf6afde3327e580cd41dafbf8c950..97775a9768432001451f5c8c5948cd74e7b7d5e2 100644 (file)
@@ -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 ) {
index d08bd52e699730fd12d7d62951003ded639e2d88..5efda2dd38da155a72425545f810a28bd392168e 100644 (file)
@@ -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
        }
index 4e4578fe9247c23a5d5c09ef5eb6f045fdc9e8f0..d8d9c23db311ad101d1e3a58bff9c5594dc86683 100644 (file)
@@ -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"
  */
 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;
index 5a5bc1770c183afea45cbca67e9a3888060d2d1b..5517afa2db4712bafaad8bc631d83190ff60e1fa 100644 (file)
@@ -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 );
index 2d69224b2ae174c3c901930836b746662153a5b6..118810a0da163e9b5e7de7b9a99b3ce25ea2f3ca 100644 (file)
@@ -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;
index 3d18b47b112181f8eafd4020f2c1258de640296c..6e4bb40c90ff14cddf4d6f2b9513cd42bac9bfca 100644 (file)
@@ -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;
 
index b2a82d0ae262a9a565a2e095afe52eab293af236..111b8bea48881687061012968a77d205076dc82e 100644 (file)
 ** 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();
 
   /*
index f7b042c36998fb025e9dbee7f96a125b0acb11dd..f3321ddab316fe53bfef4a584d3c3d7a2edc9d36 100644 (file)
 ** 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/nurbtess/monoChain.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/monoChain.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
 */
 
 #include "gluos.h"
@@ -63,7 +63,7 @@ extern Int deleteRepeatDiagonals(Int num_diagonals, directedLine** diagonal_vert
 //for debug purpose only
 static void drawDiagonals(Int num_diagonals, directedLine** diagonal_vertices)
 {
-  Int i,k;
+  Int i;
   for(i=0; i<num_diagonals; i++)
     {
       glBegin(GL_LINE);
index 385d72a80b687bc2ea72ccc9a640687485905611..e7e19437b142b235306bb2d26c27d6743371020a 100644 (file)
 ** 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: 2004/05/12 15:29:36 $ $Revision: 1.3 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.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/monoTriangulation.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $
 */
 
 #include <stdlib.h>
@@ -740,8 +740,10 @@ void monoTriangulationRecFunGen(Real* topVertex, Real* botVertex,
   assert( inc_chain != NULL && dec_chain != NULL);
   assert( ! (inc_current> inc_end &&
             dec_current> dec_end));
+  /*
   Int inc_nVertices;
   Int dec_nVertices;
+  */
   Real** inc_array ;
   Real** dec_array ;
   Int i;
index ce38666dca4640f468bb64bdbcd7dcb9584aee6d..291ade82160d1ddc6bb5146a78f32533d62430fb 100644 (file)
@@ -719,7 +719,6 @@ sampledLine*  DBG_collectSampledLinesAllPoly(directedLine *polygonList)
 void  DBG_collectSampledLinesPoly(directedLine *polygon, sampledLine*& retHead, sampledLine*& retTail)
 {
   directedLine *temp;
-  sampledLine *ret = NULL;
   retHead = NULL;
   retTail = NULL;
   if(polygon == NULL)
index 4024397ae6a6f4f26fbb0873a5d8e3981b89a8eb..6bf01ce025c3ccec9dec8bf2bbda785fbf1b3c96 100644 (file)
 ** published by SGI, but has not been independently verified as being
 ** compliant with the OpenGL(R) version 1.2.1 Specification.
 **
-** $Date: 2002/11/08 17:38:13 $ $Revision: 1.3 $
+** $Date: 2004/05/12 15:29:36 $ $Revision: 1.4 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.3 2002/11/08 17:38:13 brianp Exp $
+** $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 $
 */
 
 #include "gluos.h"
@@ -980,8 +980,10 @@ void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGrid
   Int n_ulines = grid->get_n_ulines();
   Real uMin = grid->get_u_min();
   Real uMax = grid->get_u_max();
+  /*
   Real vMin = grid->get_v_min();
   Real vMax = grid->get_v_max();
+  */
   Real slop, uinterc;
 
 #ifdef SHORTEN_GRID_LINE
@@ -1096,8 +1098,10 @@ void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGri
   Int n_ulines = grid->get_n_ulines();
   Real uMin = grid->get_u_min();
   Real uMax = grid->get_u_max();
+  /*
   Real vMin = grid->get_v_min();
   Real vMax = grid->get_v_max();
+  */
   Real slop, uinterc;
 
 #ifdef SHORTEN_GRID_LINE