From: kgv Date: Sun, 26 Jun 2016 17:10:35 +0000 (+0300) Subject: 0027643: Coding rules - eliminate GCC warning -Wmaybe-uninitialized X-Git-Tag: V7_1_0_beta~271 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=576e306647f0a2982755aa4b3efaf546a98f0c00;p=occt.git 0027643: Coding rules - eliminate GCC warning -Wmaybe-uninitialized --- diff --git a/src/GCPnts/GCPnts_AbscissaPoint.pxx b/src/GCPnts/GCPnts_AbscissaPoint.pxx index 5cba7bb154..cce1214e1b 100644 --- a/src/GCPnts/GCPnts_AbscissaPoint.pxx +++ b/src/GCPnts/GCPnts_AbscissaPoint.pxx @@ -167,7 +167,7 @@ static void AdvCompute(CPnts_AbscissaPoint& theComputer, Standard_Real& Ui, const Standard_Real EPSILON) { - Standard_Real Ratio; + Standard_Real Ratio = 1.0; GCPnts_AbscissaType Type = computeType(C,Ratio); switch (Type) { @@ -312,7 +312,7 @@ Standard_Real GCPnts_AbscissaPoint::Length(const TheCurve& C, const Standard_Real U1, const Standard_Real U2) { - Standard_Real Ratio; + Standard_Real Ratio = 1.0; GCPnts_AbscissaType Type = computeType(C,Ratio); switch (Type) { @@ -353,7 +353,7 @@ Standard_Real GCPnts_AbscissaPoint::Length(const TheCurve& C, const Standard_Real U2, const Standard_Real Tol) { - Standard_Real Ratio; + Standard_Real Ratio = 1.0; GCPnts_AbscissaType Type = computeType(C,Ratio); switch (Type) { diff --git a/src/GeomFill/GeomFill_SectionPlacement.cxx b/src/GeomFill/GeomFill_SectionPlacement.cxx index 0af4b9919e..e149490d4b 100644 --- a/src/GeomFill/GeomFill_SectionPlacement.cxx +++ b/src/GeomFill/GeomFill_SectionPlacement.cxx @@ -412,7 +412,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, PathParam = Path->FirstParameter(); SecParam = myAdpSection.FirstParameter(); - Standard_Real distaux, taux, alpha; + Standard_Real distaux, taux = 0.0, alpha; gp_Pnt PonPath, PonSec, P; gp_Vec VRef, dp1; VRef.SetXYZ(TheAxe.Direction().XYZ());