From b6ef59c124b9be5abed70125f4c9578ecadd11b1 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Thu, 28 Apr 2005 13:55:35 +0000 Subject: [PATCH] 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 --- reactos/lib/glu32/libnurbs/nurbtess/sampleComp.cc | 6 +++--- reactos/lib/glu32/libnurbs/nurbtess/sampleCompRight.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/lib/glu32/libnurbs/nurbtess/sampleComp.cc b/reactos/lib/glu32/libnurbs/nurbtess/sampleComp.cc index a06c7046ec2..ec91eccb023 100644 --- a/reactos/lib/glu32/libnurbs/nurbtess/sampleComp.cc +++ b/reactos/lib/glu32/libnurbs/nurbtess/sampleComp.cc @@ -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) diff --git a/reactos/lib/glu32/libnurbs/nurbtess/sampleCompRight.cc b/reactos/lib/glu32/libnurbs/nurbtess/sampleCompRight.cc index 93474c38d28..baba014c0d2 100644 --- a/reactos/lib/glu32/libnurbs/nurbtess/sampleCompRight.cc +++ b/reactos/lib/glu32/libnurbs/nurbtess/sampleCompRight.cc @@ -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),