Fix all these warings

libnurbs/nurbtess/sampleComp.cc: In function `void sampleCompLeft(Real*, Real*, vertexArray*, Int, Int, vertexArray*, Int, Int, gridBoundaryChain*, Int, Int, Int, Int, Int, Int, primStream*)':
libnurbs/nurbtess/sampleComp.cc:162: warning: 'gridMidIndex1' might be used uninitialized in this function
libnurbs/nurbtess/sampleComp.cc:162: warning: 'gridMidIndex2' might be used uninitialized in this function

libnurbs/nurbtess/sampleCompRight.cc: In function `void sampleCompRight(Real*, Real*, vertexArray*, Int, Int, vertexArray*, Int, Int, gridBoundaryChain*, Int, Int, Int, Int, Int, Int, primStream*)':
libnurbs/nurbtess/sampleCompRight.cc:75: warning: 'gridMidIndex1' might be used uninitialized in this function
libnurbs/nurbtess/sampleCompRight.cc:75: warning: 'gridMidIndex2' might be used uninitialized in this function

svn path=/trunk/; revision=14845
This commit is contained in:
Magnus Olsen 2005-04-28 13:55:35 +00:00
parent 4e01611563
commit b6ef59c124
2 changed files with 4 additions and 4 deletions

View file

@ -157,9 +157,9 @@ void sampleCompLeft(Real* topVertex, Real* botVertex,
/*find out whether there is a trim vertex which is
*inbetween the top and bot grid lines or not.
*/
Int midIndex1;
Int midIndex2;
Int gridMidIndex1, gridMidIndex2;
Int midIndex1 = 0;
Int midIndex2 = 0;
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

@ -72,7 +72,7 @@ void sampleCompRight(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
midIndex1 = rightChain->findIndexBelowGen(rightGridChain->get_v_value(gridIndex1),