summaryrefslogtreecommitdiff
path: root/src/glu
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
parent5222c58a68d51da1bc7d552b74b5cf1a2f667ccd (diff)
silence a bunch of compiler warnings
Diffstat (limited to 'src/glu')
-rw-r--r--src/glu/sgi/libnurbs/interface/bezierEval.cc6
-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
-rw-r--r--src/glu/sgi/libnurbs/nurbtess/monoChain.cc6
-rw-r--r--src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc8
-rw-r--r--src/glu/sgi/libnurbs/nurbtess/polyDBG.cc2
-rw-r--r--src/glu/sgi/libnurbs/nurbtess/sampleComp.cc6
-rw-r--r--src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc6
-rw-r--r--src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc10
-rw-r--r--src/glu/sgi/libutil/quad.c6
14 files changed, 69 insertions, 38 deletions
diff --git a/src/glu/sgi/libnurbs/interface/bezierEval.cc b/src/glu/sgi/libnurbs/interface/bezierEval.cc
index 47baf13120..b414f535f9 100644
--- a/src/glu/sgi/libnurbs/interface/bezierEval.cc
+++ b/src/glu/sgi/libnurbs/interface/bezierEval.cc
@@ -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.
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 ) ) {
diff --git a/src/glu/sgi/libnurbs/nurbtess/monoChain.cc b/src/glu/sgi/libnurbs/nurbtess/monoChain.cc
index f3321ddab3..dccbb2bbc0 100644
--- a/src/glu/sgi/libnurbs/nurbtess/monoChain.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/monoChain.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/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
diff --git a/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc b/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc
index e7e19437b1..3a7d5814b7 100644
--- a/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.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.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);
diff --git a/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc b/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc
index 291ade8216..4d04df73f6 100644
--- a/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc
@@ -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)
{
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc b/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc
index f2a6d5f4e4..b58de10af7 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleComp.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: 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)
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc b/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc
index ef49f9db63..46252b5939 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.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/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),
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc b/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc
index 6bf01ce025..c1b045437c 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.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.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
diff --git a/src/glu/sgi/libutil/quad.c b/src/glu/sgi/libutil/quad.c
index 8d9bcdda64..e604539c82 100644
--- a/src/glu/sgi/libutil/quad.c
+++ b/src/glu/sgi/libutil/quad.c
@@ -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;