summaryrefslogtreecommitdiff
path: root/src/glu/sgi/libnurbs/internals
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-10-28 13:09:23 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-10-28 13:09:23 +0000
commitca33e211659b36449a5b91e47328ab5554a4c665 (patch)
tree80b4f58e7e164d74b65248ad1907abead1b0e086 /src/glu/sgi/libnurbs/internals
parent5222c58a68d51da1bc7d552b74b5cf1a2f667ccd (diff)
silence a bunch of compiler warnings
Diffstat (limited to 'src/glu/sgi/libnurbs/internals')
-rw-r--r--src/glu/sgi/libnurbs/internals/dataTransform.cc9
-rw-r--r--src/glu/sgi/libnurbs/internals/intersect.cc8
-rw-r--r--src/glu/sgi/libnurbs/internals/maplist.cc6
-rw-r--r--src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc6
-rw-r--r--src/glu/sgi/libnurbs/internals/slicer.cc19
-rw-r--r--src/glu/sgi/libnurbs/internals/trimline.cc9
6 files changed, 41 insertions, 16 deletions
diff --git a/src/glu/sgi/libnurbs/internals/dataTransform.cc b/src/glu/sgi/libnurbs/internals/dataTransform.cc
index c7f9515cc0..822da02228 100644
--- a/src/glu/sgi/libnurbs/internals/dataTransform.cc
+++ b/src/glu/sgi/libnurbs/internals/dataTransform.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: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)
{
diff --git a/src/glu/sgi/libnurbs/internals/intersect.cc b/src/glu/sgi/libnurbs/internals/intersect.cc
index 118810a0da..6fb7e3239b 100644
--- a/src/glu/sgi/libnurbs/internals/intersect.cc
+++ b/src/glu/sgi/libnurbs/internals/intersect.cc
@@ -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 )
diff --git a/src/glu/sgi/libnurbs/internals/maplist.cc b/src/glu/sgi/libnurbs/internals/maplist.cc
index 0782feb969..44f8666b7a 100644
--- a/src/glu/sgi/libnurbs/internals/maplist.cc
+++ b/src/glu/sgi/libnurbs/internals/maplist.cc
@@ -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 );
}
diff --git a/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc b/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc
index 111b8bea48..b08cd91570 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: 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){
diff --git a/src/glu/sgi/libnurbs/internals/slicer.cc b/src/glu/sgi/libnurbs/internals/slicer.cc
index 6418e81669..3fc7e2723a 100644
--- a/src/glu/sgi/libnurbs/internals/slicer.cc
+++ b/src/glu/sgi/libnurbs/internals/slicer.cc
@@ -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"
diff --git a/src/glu/sgi/libnurbs/internals/trimline.cc b/src/glu/sgi/libnurbs/internals/trimline.cc
index 9ad6e1fed3..231369b6ef 100644
--- a/src/glu/sgi/libnurbs/internals/trimline.cc
+++ b/src/glu/sgi/libnurbs/internals/trimline.cc
@@ -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 ) ) {