diff --git a/src/AIS/AIS_Axis.cxx b/src/AIS/AIS_Axis.cxx index 55c00c2fe7..0eaf8f32da 100755 --- a/src/AIS/AIS_Axis.cxx +++ b/src/AIS/AIS_Axis.cxx @@ -270,7 +270,7 @@ void AIS_Axis::ComputeFields() gp_Dir oX = myAx2->Ax2().XDirection(); gp_Dir oY = myAx2->Ax2().YDirection(); gp_Dir oZ = myAx2->Ax2().Direction(); - Quantity_Length xo,yo,zo,x,y,z; + Quantity_Length xo,yo,zo,x = 0.,y = 0.,z = 0.; Orig.Coord(xo,yo,zo); myPfirst.SetCoord(xo,yo,zo); diff --git a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx index 8705445cbf..84013ac237 100755 --- a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx +++ b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx @@ -332,17 +332,17 @@ static void Locate1Coord(const Standard_Integer Index, //======================================================================= static void Locate1Coord(const Standard_Integer Index, - const gp_Pnt2d& UV, - const gp_Vec2d& DUV, - const Handle(Geom_BSplineSurface)& BSplS, - Standard_Boolean& DIsNull, - gp_Pnt2d& LeftBot, - gp_Pnt2d& RightTop) + const gp_Pnt2d& UV, + const gp_Vec2d& DUV, + const Handle(Geom_BSplineSurface)& BSplS, + Standard_Boolean& DIsNull, + gp_Pnt2d& LeftBot, + gp_Pnt2d& RightTop) { Standard_Real Comp1=0,DComp1=0; Standard_Real Tol = Precision::PConfusion()/10; - Standard_Integer i=1, Up=0, Up1, Up2, Down=0, Down1, Down2, Bnd1, Bnd2; - Standard_Real cur=0, f, l; + Standard_Integer i=1, Up=0, Up1, Up2, Down=0, Down1, Down2; + Standard_Real cur = 0.; DIsNull= Standard_False; @@ -351,96 +351,193 @@ static void Locate1Coord(const Standard_Integer Index, Up2 = BSplS->LastVKnotIndex(); Down2 = BSplS->FirstVKnotIndex(); - - if(Index==1){ i = Down1; Comp1 = UV.X(); DComp1= DUV.X(); Up=Up1; Down=Down1; - while ( ( Abs(BSplS->UKnot(i)-Comp1)>Tol )&&(i!=Up1 ) ) i++; - cur = BSplS->UKnot(i); - } else - if(Index==2) { i = Down2; Comp1 = UV.Y(); DComp1=DUV.Y(); Up=Up2; Down=Down2; - while ( ( Abs(BSplS->VKnot(i)-Comp1)>Tol )&&(i!=Up2 ) ) i++; - cur = BSplS->VKnot(i); - } + if(Index==1) + { + i = Down1; + Comp1 = UV.X(); + DComp1= DUV.X(); + Up=Up1; + Down=Down1; + + while ( ( Abs(BSplS->UKnot(i)-Comp1)>Tol )&&(i!=Up1 ) ) + { + i++; + } + + cur = BSplS->UKnot(i); + } + else if(Index==2) + { + i = Down2; + Comp1 = UV.Y(); + DComp1=DUV.Y(); + Up=Up2; + Down=Down2; + + while ( ( Abs(BSplS->VKnot(i)-Comp1)>Tol )&&(i!=Up2 ) ) + { + i++; + } + + cur = BSplS->VKnot(i); + } if( Abs(Comp1-cur)<=Tol ) - { - Bnd1 = Down; Bnd2 = Up; - if(Index==1) { - TColStd_Array1OfReal Arr1(1,BSplS->NbUKnots()); - BSplS->UKnots(Arr1); // Up1=Arr1.Upper(); Down1=Arr1.Lower(); - FindBounds(Arr1,cur,DUV.X(),Bnd1,Bnd2,DIsNull); - } - else if(Index==2) { - TColStd_Array1OfReal Arr2(1,BSplS->NbVKnots()); - BSplS->VKnots(Arr2); // Up2=Arr2.Upper(); Down2=Arr2.Lower(); - FindBounds(Arr2,cur,DUV.Y(),Bnd1,Bnd2,DIsNull); - } - - ReverseParam(Bnd1,Bnd2,Bnd1,Bnd2); - - if(DIsNull==Standard_False){ - if(Index==1) {LeftBot.SetX(BSplS->UKnot(Bnd1)); - RightTop.SetX(BSplS->UKnot(Bnd2));} - else - if(Index==2){ LeftBot.SetY(BSplS->VKnot(Bnd1)); - RightTop.SetY(BSplS->VKnot(Bnd2)); - } - } - } - else//*********if Coord != Knot + { + Standard_Integer Bnd1 = Down, Bnd2 = Up; + if(Index==1) { - if( (Index==1)&&(Comp1 < BSplS->UKnot(Down)) ) - { LeftBot.SetX(BSplS->UKnot(Down)); - RightTop.SetX( BSplS->UKnot(Down + 1) ); - return; } - else - if( (Index==2)&&(Comp1 < BSplS->VKnot(Down)) ) - { LeftBot.SetY(BSplS->VKnot(Down)); - RightTop.SetY( BSplS->VKnot(Down + 1) ); - return; } - else - if( (Index==1)&&(Comp1 > BSplS->UKnot(Up)) ) - { RightTop.SetX(BSplS->UKnot(Up - 1)); - LeftBot.SetX( BSplS->UKnot(Up) ); - return; } - else - if( (Index==2)&&(Comp1 > BSplS->VKnot(Up)) ) - { RightTop.SetY(BSplS->VKnot(Up - 1)); - LeftBot.SetY( BSplS->VKnot(Up) ); - return; } - else - { i = Down; - if( (Index==1)&&(!(Comp1 < BSplS->UKnot(Down)))&&(!(Comp1 > BSplS->UKnot(Up))) ) - while (!( ((f=BSplS->UKnot(i)) < Comp1)&&((l=BSplS->UKnot(i+1)) > Comp1)) && (iVKnot(Down)))&&(!(Comp1 > BSplS->VKnot(Up))) ) - while (!(((f=BSplS->VKnot(i)) < Comp1)&&((l=BSplS->VKnot(i+1)) > Comp1)) && (iTol) - {if(Index==1) { - if(DComp1>0){ LeftBot.SetX(Comp1); RightTop.SetX(l);}else - if(DComp1<0){LeftBot.SetX(f); RightTop.SetX(Comp1);} - }else - if(Index==2) { - if(DComp1>0){ LeftBot.SetY(Comp1); RightTop.SetY(l);}else - if(DComp1<0){ LeftBot.SetY(f); RightTop.SetY(Comp1);} - } - } - else - { - if(Abs(DComp1)UKnot(i));} else - if(Index==2) { LeftBot.SetY(Comp1); RightTop.SetY(BSplS->VKnot(i));} - } - } + TColStd_Array1OfReal Arr1(1,BSplS->NbUKnots()); + BSplS->UKnots(Arr1); // Up1=Arr1.Upper(); Down1=Arr1.Lower(); + FindBounds(Arr1,cur,DUV.X(),Bnd1,Bnd2,DIsNull); } + else if(Index==2) + { + TColStd_Array1OfReal Arr2(1,BSplS->NbVKnots()); + BSplS->VKnots(Arr2); // Up2=Arr2.Upper(); Down2=Arr2.Lower(); + FindBounds(Arr2,cur,DUV.Y(),Bnd1,Bnd2,DIsNull); + } + + ReverseParam(Bnd1,Bnd2,Bnd1,Bnd2); + + if(DIsNull==Standard_False) + { + if(Index==1) + { + LeftBot.SetX(BSplS->UKnot(Bnd1)); + RightTop.SetX(BSplS->UKnot(Bnd2)); + } + else if(Index==2) + { + LeftBot.SetY(BSplS->VKnot(Bnd1)); + RightTop.SetY(BSplS->VKnot(Bnd2)); + } + } + } + else//*********if Coord != Knot + { + if( (Index==1)&&(Comp1 < BSplS->UKnot(Down)) ) + { + LeftBot.SetX(BSplS->UKnot(Down)); + RightTop.SetX( BSplS->UKnot(Down + 1) ); + return; + } + else if( (Index==2)&&(Comp1 < BSplS->VKnot(Down)) ) + { + LeftBot.SetY(BSplS->VKnot(Down)); + RightTop.SetY( BSplS->VKnot(Down + 1) ); + return; + } + else if( (Index==1)&&(Comp1 > BSplS->UKnot(Up)) ) + { + RightTop.SetX(BSplS->UKnot(Up - 1)); + LeftBot.SetX( BSplS->UKnot(Up) ); + return; + } + else if( (Index==2)&&(Comp1 > BSplS->VKnot(Up)) ) + { + RightTop.SetY(BSplS->VKnot(Up - 1)); + LeftBot.SetY( BSplS->VKnot(Up) ); + return; + } + else + { + Standard_Real f = 0., l = 1.; + if (Index==1) + { + f=BSplS->UKnot(Down); + l=BSplS->UKnot(Up); + } + else if (Index == 2) + { + f=BSplS->VKnot(Down); + l=BSplS->VKnot(Up); + } + + i = Down; + if ((!(Comp1 < f))&&(!(Comp1 > l))) + { + if (Index==1) + { + while (!(((f=BSplS->UKnot(i)) < Comp1)&&((l=BSplS->UKnot(i+1)) > Comp1)) && (iVKnot(i)) < Comp1)&&((l=BSplS->VKnot(i+1)) > Comp1)) && (iTol) + { + if(Index==1) + { + if(DComp1>0) + { + LeftBot.SetX(Comp1); + RightTop.SetX(l); + } + else if(DComp1<0) + { + LeftBot.SetX(f); + RightTop.SetX(Comp1); + } + } + else if(Index==2) + { + if(DComp1>0) + { + LeftBot.SetY(Comp1); + RightTop.SetY(l); + } + else if(DComp1<0) + { + LeftBot.SetY(f); + RightTop.SetY(Comp1); + } + } + } + else + { + if(Abs(DComp1)UKnot(i)); + } + else if(Index==2) + { + LeftBot.SetY(Comp1); + RightTop.SetY(BSplS->VKnot(i)); + } + } + } + } } //======================================================================= //function :Locate2Coord diff --git a/src/Adaptor3d/Adaptor3d_TopolTool.cxx b/src/Adaptor3d/Adaptor3d_TopolTool.cxx index cfaa83dae2..f852a0c162 100755 --- a/src/Adaptor3d/Adaptor3d_TopolTool.cxx +++ b/src/Adaptor3d/Adaptor3d_TopolTool.cxx @@ -936,7 +936,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl, uinf = myS->FirstUParameter(); usup = myS->LastUParameter(); vinf = myS->FirstVParameter(); vsup = myS->LastVParameter(); - Standard_Integer i, j, k, nbi; + Standard_Integer i, k, j = 1; Standard_Real t1, t2, dt; Standard_Integer ui1 = aBS->FirstUKnotIndex(); Standard_Integer ui2 = aBS->LastUKnotIndex(); @@ -1023,7 +1023,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl, } } else { - nbi = aBS->UDegree(); + Standard_Integer nbi = aBS->UDegree(); k = 0; t1 = uinf; for(i = ui1+1; i <= ui2; ++i) { @@ -1058,7 +1058,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl, } } else { - nbi = aBS->VDegree(); + Standard_Integer nbi = aBS->VDegree(); k = 0; t1 = vinf; for(i = vi1+1; i <= vi2; ++i) { diff --git a/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx b/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx index cf529d3a31..0e717ddffd 100755 --- a/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx +++ b/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx @@ -288,7 +288,7 @@ int mma1cdi_(integer *ndimen, /* Local variables */ integer nroo2, ncfhe, nd, ii, kk; integer ibb, kkm, kkp; - doublereal bid1, bid2, bid3; + doublereal bid1, bid2, bid3 = 0.; /* ********************************************************************** */ @@ -971,7 +971,7 @@ int mma1fer_(integer *,//ndimen, integer crvjac_dim1, crvjac_offset, i__1, i__2; /* Local variables */ - integer idim, ncfja, ncfnw, ndses, ii, kk, ibb, ier = 0; + integer idim, ncfja, ncfnw, ndses, ii, kk, ibb, ier; integer nbr0; @@ -3323,7 +3323,7 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, intptr_t iofwr; doublereal* wrkar = 0; integer iszwr; - integer ibb, ier; + integer ibb, ier = 0; integer isz1, isz2, isz3, isz4; intptr_t ipt1, ipt2, ipt3, ipt4; diff --git a/src/AdvApp2Var/AdvApp2Var_Iso.cxx b/src/AdvApp2Var/AdvApp2Var_Iso.cxx index 91e367d354..dbf6eeeaf7 100755 --- a/src/AdvApp2Var/AdvApp2Var_Iso.cxx +++ b/src/AdvApp2Var/AdvApp2Var_Iso.cxx @@ -139,7 +139,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions, Standard_Real TCONST = myConstPar; // data related to the type of the iso - Standard_Integer ISOFAV,NBROOT,NDGJAC,NCFLIM; + Standard_Integer ISOFAV = 0,NBROOT = 0,NDGJAC = 0,NCFLIM = 1; Standard_Real TABDEC[2]; Handle (TColStd_HArray1OfReal) HUROOT = Conditions.URoots(); Handle (TColStd_HArray1OfReal) HVROOT = Conditions.VRoots(); diff --git a/src/AdvApp2Var/AdvApp2Var_MathBase.cxx b/src/AdvApp2Var/AdvApp2Var_MathBase.cxx index 110ff02942..fab4947bd8 100755 --- a/src/AdvApp2Var/AdvApp2Var_MathBase.cxx +++ b/src/AdvApp2Var/AdvApp2Var_MathBase.cxx @@ -2252,7 +2252,7 @@ int AdvApp2Var_MathBase::mmcglc1_(integer *ndimax, integer ndec; doublereal tdeb, tfin; integer iter; - doublereal oldso; + doublereal oldso = 0.; integer itmax; doublereal sottc; integer kk, ibb; @@ -4757,8 +4757,8 @@ int AdvApp2Var_MathBase::mmfmtb1_(integer *maxsz1, /* Local variables */ doublereal* work = 0; - integer ilong, isize, ii, jj, ier; - intptr_t iofst,iipt, jjpt; + integer ilong, isize, ii, jj, ier = 0; + intptr_t iofst = 0,iipt, jjpt; /************************************************************************ @@ -6355,8 +6355,9 @@ int mmloncv_(integer *ndimax, /* Local variables */ doublereal tran; - integer ngaus; - doublereal c1, c2, d1, d2, wgaus[20], uroot[20], x1, x2, dd; + integer ngaus = 0; + doublereal c1, c2, d1, d2, + wgaus[20] = {0.}, uroot[20] = {0.}, x1, x2, dd; integer ii, jj, kk; doublereal som; doublereal der1, der2; @@ -9638,7 +9639,7 @@ L9999: doublereal d__1; /* Local variables */ - integer nchif, iunit, izero; + integer nchif, iunit = 1, izero; doublereal vnorm; integer ii; doublereal bid; diff --git a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx index 576214e434..696b3d26be 100755 --- a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx +++ b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx @@ -747,7 +747,7 @@ int macrgfl_(intptr_t *iadfld, char cbid[1]; integer ibid, ienr; doublereal* t = 0; - integer novfl; + integer novfl = 0; intptr_t ioff,iadrfl, iadt; diff --git a/src/AdvApprox/AdvApprox_SimpleApprox.cxx b/src/AdvApprox/AdvApprox_SimpleApprox.cxx index fc0476c9cc..b38f15f9d9 100755 --- a/src/AdvApprox/AdvApprox_SimpleApprox.cxx +++ b/src/AdvApprox/AdvApprox_SimpleApprox.cxx @@ -208,7 +208,7 @@ void AdvApprox_SimpleApprox::Perform(const TColStd_Array1OfInteger& LocalDimensi } // the computation of Qq(t) - Standard_Real Sum; + Standard_Real Sum = 0.; for (k=0; k<=DegreeQ; k+=2) { for (idim=1; idim<=myTotalDimension; idim++) { Sum=0.; diff --git a/src/AppParCurves/AppParCurves_ResolConstraint.gxx b/src/AppParCurves/AppParCurves_ResolConstraint.gxx index 7c074d40e4..a2e4a5ffcd 100755 --- a/src/AppParCurves/AppParCurves_ResolConstraint.gxx +++ b/src/AppParCurves/AppParCurves_ResolConstraint.gxx @@ -74,12 +74,11 @@ AppParCurves_ResolConstraint:: ICurv(1, LastPoint-FirstPoint+1) { Standard_Integer i, j, k, NbCu= SCurv.NbCurves(); -// Standard_Integer Npt, Nptl = LastPoint-FirstPoint+1; Standard_Integer Npt; - Standard_Integer Inc3, IncSec, IncCol, IP, CCol; + Standard_Integer Inc3, IncSec, IncCol, IP = 0, CCol; Standard_Integer myindex, Def = SCurv.NbPoles()-1; Standard_Integer nb3d, nb2d, Npol= Def+1, Npol2 = 2*Npol; - Standard_Real T1, T2, T3, Tmax, Daij; + Standard_Real T1 = 0., T2 = 0., T3, Tmax, Daij; Standard_Boolean Ok; gp_Vec V; gp_Vec2d V2d; @@ -273,191 +272,110 @@ AppParCurves_ResolConstraint:: // Equations exprimant le meme rapport de tangence sur chaque courbe: // On prend les coordonnees les plus significatives. - Inc3 = Inc3 -1; - for (i =1; i <= IncTan; i++) { + --Inc3; + for (i = 1; i <= IncTan; ++i) { IncCol = 0; Npt = ITan(i); - for (k = 1; k <= NbCu-1; k++) { - Inc3 = Inc3 + 1; - if (Ibont(k, i) == 1) { - if (k <= nb3d) { - Ok = ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k); - T1 = V.X(); - IP = 3*Npol; - } - else { - Ok = ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k-nb3d); - T1 = V2d.X(); - IP = 2*Npol; - } - if (Ibont(k+1, i) == 1) { // Relations entre T1x et T2x: - if ((k+1) <= nb3d) { - Ok = ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.X(); - } - else { - Ok = ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1-nb3d); - T2 = V2d.X(); - } - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j + IncCol) = Daij*T2; - Cont(Inc3, j + IP + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } - else if (Ibont(k+1, i) == 2) { // Relations entre T1x et T2y: - if ((k+1) <= nb3d) { - Ok = ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Y(); - } - else { - Ok = ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1-nb3d); - T2 = V2d.Y(); - } - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j + IncCol) = Daij*T2; - Cont(Inc3, j + IP + Npol + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } - else if (Ibont(k+1,i) == 3) { // Relations entre T1x et T2z: - Ok = ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Z(); - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j + IncCol) = Daij*T2; - Cont(Inc3, j + IP + 2*Npol + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } + for (k = 1; k <= NbCu-1; ++k) { + ++Inc3; +// Initialize first relation variable (T1) + Standard_Integer addIndex_1 = 0, aVal = Ibont(k, i); + switch (aVal) + { + case 1: //T1 ~ T1x + { + if (k <= nb3d) { + Ok = ToolLine::Tangency(SSP, Npt, tabV); + V = tabV(k); + T1 = V.X(); + IP = 3 * Npol; + } + else { + Ok = ToolLine::Tangency(SSP, Npt, tabV2d); + V2d = tabV2d(k-nb3d); + T1 = V2d.X(); + IP = 2 * Npol; + } + addIndex_1 = 0; + break; + } + case 2: //T1 ~ T1y + { + if (k <= nb3d) { + Ok = ToolLine::Tangency(SSP, Npt, tabV); + V = tabV(k); + IP = 3 * Npol; + } + else { + Ok = ToolLine::Tangency(SSP, Npt, tabV2d); + V2d = tabV2d(k-nb3d); + T1 = V2d.Y(); + IP = 2 * Npol; + } + addIndex_1 = Npol; + break; + } + case 3: //T1 ~ T1z + { + Ok = ToolLine::Tangency(SSP, Npt, tabV); + V = tabV(k); + T1 = V.Z(); + IP = 3 * Npol; + addIndex_1 = 2 * Npol; + break; + } } - else if (Ibont(k,i) == 2) { - if (k <= nb3d) { - Ok = ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k); - IP = 3*Npol; - } - else { - Ok = ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k-nb3d); - T1 = V2d.Y(); - IP = 2*Npol; - } - if (Ibont(k+1, i) == 1) { // Relations entre T1y et T2x: - if ((k+1) <= nb3d) { - Ok = ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.X(); - } - else { - Ok = ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1-nb3d); - T2 = V2d.X(); - } - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j + Npol + IncCol) = Daij*T2; - Cont(Inc3, j + IP + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - - } - else if (Ibont(k+1, i) == 2) { // Relations entre T1y et T2y: - if ((k+1) <= nb3d) { - Ok = ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Y(); - } - else { - Ok = ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1-nb3d); - T2 = V2d.Y(); - } - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j + Npol + IncCol) = Daij*T2; - Cont(Inc3, j + IP + Npol + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - - } - else if (Ibont(k+1,i)== 3) { // Relations entre T1y et T2z: - Ok = ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Z(); - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j + Npol +IncCol) = Daij*T2; - Cont(Inc3, j + IP + 2*Npol + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } + // Initialize second relation variable (T2) + Standard_Integer addIndex_2 = 0, aNextVal = Ibont(k + 1, i); + switch (aNextVal) + { + case 1: //T2 ~ T2x + { + if ((k+1) <= nb3d) { + Ok = ToolLine::Tangency(SSP, Npt, tabV); + V = tabV(k+1); + T2 = V.X(); + } + else { + Ok = ToolLine::Tangency(SSP, Npt, tabV2d); + V2d = tabV2d(k+1-nb3d); + T2 = V2d.X(); + } + addIndex_2 = 0; + break; + } + case 2: //T2 ~ T2y + { + if ((k+1) <= nb3d) { + Ok = ToolLine::Tangency(SSP, Npt, tabV); + V = tabV(k+1); + T2 = V.Y(); + } + else { + Ok = ToolLine::Tangency(SSP, Npt, tabV2d); + V2d = tabV2d(k+1-nb3d); + T2 = V2d.Y(); + } + addIndex_2 = Npol; + break; + } + case 3: //T2 ~ T2z + { + Ok = ToolLine::Tangency(SSP, Npt, tabV); + V = tabV(k+1); + T2 = V.Z(); + addIndex_2 = 2 * Npol; + break; + } } - - else { - Ok = ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k); - T1 = V.Z(); - IP = 3*Npol; - if (Ibont(k+1, i) == 1) { // Relations entre T1z et T2x: - if ((k+1) <= nb3d) { - Ok = ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.X(); - } - else { - Ok = ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1-nb3d); - T2 = V2d.X(); - } - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j + 2*Npol +IncCol) = Daij*T2; - Cont(Inc3, j + IP + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } - - else if (Ibont(k+1, i) == 2) { // Relations entre T1z et T2y: - if ((k+1) <= nb3d) { - Ok = ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Y(); - } - else { - Ok = ToolLine::Tangency(SSP, Npt, tabV2d); - V2d = tabV2d(k+1-nb3d); - T2 = V2d.Y(); - } - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j + 2*Npol +IncCol) = Daij*T2; - Cont(Inc3, j + IP + Npol + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } - - else if (Ibont(k+1,i)==3) { // Relations entre T1z et T2z: - Ok = ToolLine::Tangency(SSP, Npt, tabV); - V = tabV(k+1); - T2 = V.Z(); - for (j = 1; j <= Npol; j++) { - Daij = DerivativeBern(Npt, j); - Cont(Inc3, j + 2*Npol + IncCol) = Daij*T2; - Cont(Inc3, j + IP + 2*Npol + IncCol) = -Daij*T1; - } - IncCol = IncCol + IP; - } + + // Relations between T1 and T2: + for (j = 1; j <= Npol; j++) { + Daij = DerivativeBern(Npt, j); + Cont(Inc3, j + IncCol + addIndex_1) = Daij*T2; + Cont(Inc3, j + IP + IncCol + addIndex_2) = -Daij*T1; } + IncCol += IP; } } diff --git a/src/AppParCurves/AppParCurves_Variational_1.gxx b/src/AppParCurves/AppParCurves_Variational_1.gxx index 1cad36f8e3..e4ec1ce8e8 100755 --- a/src/AppParCurves/AppParCurves_Variational_1.gxx +++ b/src/AppParCurves/AppParCurves_Variational_1.gxx @@ -51,17 +51,17 @@ void AppParCurves_Variational::TheMotor( Handle(TColStd_HArray1OfReal) CurrentTi, NewTi, OldTi; Handle(TColStd_HArray2OfInteger) Dependence; Standard_Boolean lestim, lconst, ToOptim, iscut; - Standard_Boolean isnear, again = Standard_True; + Standard_Boolean isnear = Standard_False, again = Standard_True; Standard_Integer NbEst, ICDANA, NumPnt, Iter; Standard_Integer MaxNbEst =5; Standard_Real VOCRI[3] = {BigValue, BigValue, BigValue}, EROLD = BigValue, - VALCRI[3], ERRMAX, ERRMOY, ERRQUA; + VALCRI[3], ERRMAX = BigValue, ERRMOY, ERRQUA; Standard_Real CBLONG, LNOLD; Standard_Integer NbrPnt = myLastPoint - myFirstPoint + 1; Standard_Integer NbrConstraint = myNbPassPoints + myNbTangPoints + myNbCurvPoints; Handle(FEmTool_Curve) CCurrent, COld, CNew; - Standard_Real EpsLength;// = 1.e-6 * CBLONG / NbrPnt; - Standard_Real EpsDeg; // = Min(WQuality * .1, CBLONG * .001); + Standard_Real EpsLength = SmallValue; + Standard_Real EpsDeg; Standard_Real e1, e2, e3; Standard_Real J1min, J2min, J3min; @@ -366,8 +366,3 @@ void AppParCurves_Variational::TheMotor( delete TheAssembly; } - - - - - diff --git a/src/Approx/Approx_ComputeCLine.gxx b/src/Approx/Approx_ComputeCLine.gxx index 00562f5c9b..d88e1109da 100755 --- a/src/Approx/Approx_ComputeCLine.gxx +++ b/src/Approx/Approx_ComputeCLine.gxx @@ -28,6 +28,7 @@ #include #include #include +#include //======================================================================= //function : Approx_ComputeCLine @@ -89,12 +90,10 @@ Approx_ComputeCLine::Approx_ComputeCLine void Approx_ComputeCLine::Perform(const MultiLine& Line) { - - Standard_Real UFirst, ULast; Standard_Boolean Finish = Standard_False, begin = Standard_True, Ok = Standard_False; - Standard_Real thetol3d, thetol2d; + Standard_Real thetol3d = Precision::Confusion(), thetol2d = Precision::Confusion(); UFirst = LineTool::FirstParameter(Line); ULast = LineTool::LastParameter(Line); Standard_Real TolU = (ULast-UFirst)*1.e-05; @@ -116,11 +115,9 @@ void Approx_ComputeCLine::Perform(const MultiLine& Line) // previous decision to be taken if we get worse with next cut (eap) AppParCurves_MultiCurve KeptMultiCurve; - Standard_Real KeptUfirst, KeptUlast, KeptT3d, KeptT2d; + Standard_Real KeptUfirst = 0., KeptUlast = 0., KeptT3d = RealLast(), KeptT2d = 0.; Standard_Integer NbWorseDecis = 0, NbAllowedBadDecis = 10; - - KeptT3d = RealLast(); KeptT2d = 0; - + while (!Finish) { // Gestion du decoupage de la multiline pour approximer: diff --git a/src/BOPAlgo/BOPAlgo_BOP.cxx b/src/BOPAlgo/BOPAlgo_BOP.cxx index 3def311de5..56e84611e4 100644 --- a/src/BOPAlgo/BOPAlgo_BOP.cxx +++ b/src/BOPAlgo/BOPAlgo_BOP.cxx @@ -467,7 +467,7 @@ static void BOPAlgo_BOP::BuildRC() { Standard_Boolean bFlag; - Standard_Integer i, aDmin, aNb[2], iX, iY; + Standard_Integer i, aDmin, aNb[2], iX = 0, iY = 0; TopAbs_ShapeEnum aTmin; TopoDS_Compound aC, aCS[2]; BRep_Builder aBB; diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index 977430fa93..022771071d 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -478,7 +478,7 @@ void BOPAlgo_PaveFiller::PerformFF() } // Standard_Boolean bHasPaveBlocks, bOld; - Standard_Integer iErr, nSx, nVSD, iX, iP, iC, j, nV, iV, iE, k; + Standard_Integer iErr, nSx, nVSD, iX, iP, iC, j, nV, iV = 0, iE, k; Standard_Integer jx; Standard_Real aT; Standard_Integer aNbLPBx; diff --git a/src/BOPDS/BOPDS_DS.cxx b/src/BOPDS/BOPDS_DS.cxx index cc6f879281..9e4a91f77e 100644 --- a/src/BOPDS/BOPDS_DS.cxx +++ b/src/BOPDS/BOPDS_DS.cxx @@ -725,7 +725,7 @@ BOPDS_ListOfPaveBlock& BOPDS_DS::ChangePaveBlocks(const Standard_Integer theI) //======================================================================= void BOPDS_DS::InitPaveBlocks(const Standard_Integer theI) { - Standard_Integer nV, iRef, aNbV, nVSD, i; + Standard_Integer nV = 0, iRef, aNbV, nVSD, i; Standard_Real aT; TopoDS_Vertex aV; BOPCol_ListIteratorOfListOfInteger aIt; diff --git a/src/BOPTools/BOPTools_AlgoTools.cxx b/src/BOPTools/BOPTools_AlgoTools.cxx index 59439bc639..5611f37fe2 100644 --- a/src/BOPTools/BOPTools_AlgoTools.cxx +++ b/src/BOPTools/BOPTools_AlgoTools.cxx @@ -1470,7 +1470,7 @@ Standard_Boolean FindFacePairs (const TopoDS_Edge& theE, { Standard_Boolean bFound; Standard_Integer i, aNbCEF; - TopAbs_Orientation aOr, aOrC; + TopAbs_Orientation aOr, aOrC = TopAbs_FORWARD; BOPCol_MapOfShape aMFP; TopoDS_Face aF1, aF2; TopoDS_Edge aEL, aE1; diff --git a/src/BOPTools/BOPTools_AlgoTools3D.cxx b/src/BOPTools/BOPTools_AlgoTools3D.cxx index dac4e6f1e4..1ca2a76954 100644 --- a/src/BOPTools/BOPTools_AlgoTools3D.cxx +++ b/src/BOPTools/BOPTools_AlgoTools3D.cxx @@ -90,7 +90,7 @@ static void BOPTools_AlgoTools3D::DoSplitSEAMOnFace (const TopoDS_Edge& aSplit, const TopoDS_Face& aF) { - Standard_Boolean bIsUPeriodic, bIsVPeriodic, bIsLeft; + Standard_Boolean bIsUPeriodic, bIsVPeriodic, bIsLeft = Standard_False; Standard_Real aTol, a, b, anUPeriod, anVPeriod, aT, anU, dU=1.e-7, anU1, anV, dV=1.e-7, anV1; Standard_Real aScPr; @@ -116,7 +116,7 @@ static // if (!bIsUPeriodic && !bIsVPeriodic) { Standard_Boolean bIsUClosed, bIsVClosed; - Standard_Real aUmin, aUmax, aVmin, aVmax; + Standard_Real aUmin = 0., aUmax = 0., aVmin = 0., aVmax = 0.; Handle(Geom_BSplineSurface) aBS; Handle(Geom_BezierSurface) aBZ; // @@ -741,7 +741,7 @@ void Add(const TopoDS_Shape& aS, Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint; Standard_Integer iErr, aIx, aNbDomains, i; Standard_Real aUMin, aUMax, aVMin, aVMax; - Standard_Real aVx, aUx, aV1, aV2, aEpsT; + Standard_Real aVx = 0., aUx, aV1, aV2, aEpsT; gp_Dir2d aD2D (0., 1.); gp_Pnt2d aP2D; gp_Pnt aPx; diff --git a/src/BOPTools/BOPTools_AlgoTools_1.cxx b/src/BOPTools/BOPTools_AlgoTools_1.cxx index 4d99c1508d..924f85ec4c 100644 --- a/src/BOPTools/BOPTools_AlgoTools_1.cxx +++ b/src/BOPTools/BOPTools_AlgoTools_1.cxx @@ -716,7 +716,7 @@ void CheckEdge (const TopoDS_Edge& Ed, const Standard_Real aMaxTol) TopoDS_Iterator aItF, aItW, aItE; BRep_Builder aBB; // - aTolF = BRep_Tool::Tolerance(aF); + aTolE = aTolF = BRep_Tool::Tolerance(aF); aItF.Initialize(aF); for (; aItF.More(); aItF.Next()) { const TopoDS_Shape& aS = aItF.Value(); diff --git a/src/BOPTools/BOPTools_AlgoTools_2.cxx b/src/BOPTools/BOPTools_AlgoTools_2.cxx index e57f7624b6..f75982b30c 100644 --- a/src/BOPTools/BOPTools_AlgoTools_2.cxx +++ b/src/BOPTools/BOPTools_AlgoTools_2.cxx @@ -415,7 +415,7 @@ static //======================================================================= Standard_Integer BOPTools_AlgoTools::Dimension(const TopoDS_Shape& theS) { - Standard_Integer i, iRet, iRx0, iRx; + Standard_Integer i, iRet, iRx0 = 0, iRx = 0; TopAbs_ShapeEnum aTS; BOPCol_ListOfShape aLS; BOPCol_ListIteratorOfListOfShape aIt; diff --git a/src/BRep/BRep_Builder.cxx b/src/BRep/BRep_Builder.cxx index 5ab0f4ffc9..2c501de189 100755 --- a/src/BRep/BRep_Builder.cxx +++ b/src/BRep/BRep_Builder.cxx @@ -63,7 +63,7 @@ static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr, { BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr); Handle(BRep_GCurve) GC; - Standard_Real f,l; + Standard_Real f = 0.,l = 0.; while (itcr.More()) { GC = Handle(BRep_GCurve)::DownCast(itcr.Value()); @@ -105,7 +105,7 @@ static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr, BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr); Handle(BRep_CurveRepresentation) cr; Handle(BRep_GCurve) GC; - Standard_Real f,l; + Standard_Real f = 0.,l = 0.; Standard_Boolean rangeFound = Standard_False; // search the range of the 3d curve @@ -171,7 +171,7 @@ static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr, BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr); Handle(BRep_CurveRepresentation) cr; Handle(BRep_GCurve) GC; - Standard_Real f,l; + Standard_Real f = 0.,l = 0.; Standard_Boolean rangeFound = Standard_False; // search the range of the 3d curve @@ -238,7 +238,7 @@ static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr, BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr); Handle(BRep_CurveRepresentation) cr; Handle(BRep_GCurve) GC; - Standard_Real f,l; + Standard_Real f = 0.,l = 0.; while (itcr.More()) { GC = Handle(BRep_GCurve)::DownCast(itcr.Value()); @@ -285,7 +285,7 @@ static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr, BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr); Handle(BRep_CurveRepresentation) cr; Handle(BRep_GCurve) GC; - Standard_Real f,l; + Standard_Real f = 0.,l = 0.; while (itcr.More()) { GC = Handle(BRep_GCurve)::DownCast(itcr.Value()); diff --git a/src/BRepAlgo/BRepAlgo.cxx b/src/BRepAlgo/BRepAlgo.cxx index da2b79ab83..68bf4c0e13 100755 --- a/src/BRepAlgo/BRepAlgo.cxx +++ b/src/BRepAlgo/BRepAlgo.cxx @@ -254,7 +254,7 @@ TopoDS_Edge BRepAlgo::ConcatenateWireC0(const TopoDS_Wire& aWire) TColStd_SequenceOfReal FparSeq; TColStd_SequenceOfReal LparSeq; TColStd_SequenceOfReal TolSeq; - GeomAbs_CurveType CurType; + GeomAbs_CurveType CurType = GeomAbs_OtherCurve; TopoDS_Vertex FirstVertex, LastVertex; Standard_Boolean FinalReverse = Standard_False; @@ -294,7 +294,7 @@ TopoDS_Edge BRepAlgo::ConcatenateWireC0(const TopoDS_Wire& aWire) else { Standard_Boolean Done = Standard_False; - Standard_Real NewFpar, NewLpar; + Standard_Real NewFpar = 0., NewLpar = 0.; GeomAdaptor_Curve GAprevcurve(CurveSeq.Last()); TopoDS_Vertex CurVertex = wexp.CurrentVertex(); TopoDS_Vertex CurFirstVer = TopExp::FirstVertex(anEdge); diff --git a/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx b/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx index 3215bb976e..a8d22c60b9 100755 --- a/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx +++ b/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx @@ -553,8 +553,8 @@ void BRepBlend_RstRstLineBuilder::InternalPerform(Blend_RstRstFunction& Func, } Blend_Status State = Blend_OnRst12; Standard_Real trst11 = 0., trst12 = 0., trst21 = 0., trst22 = 0.; - TopAbs_State situonc1, situonc2; - Blend_DecrochStatus decroch; + TopAbs_State situonc1 = TopAbs_UNKNOWN, situonc2 = TopAbs_UNKNOWN; + Blend_DecrochStatus decroch = Blend_NoDecroch; Standard_Boolean Arrive, recadp1, recadp2, recadrst1, recadrst2, echecrecad; Standard_Real wp1, wp2, wrst1, wrst2; math_Vector infbound(1, 2), supbound(1, 2); diff --git a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx index 61eae61972..e72b0e10d1 100755 --- a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx +++ b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx @@ -164,7 +164,7 @@ Standard_Integer BRepBlend_SurfRstLineBuilder:: Standard_Boolean ok = Standard_False; Standard_Boolean byinter = (line->NbPoints() != 0), okinter = 0; Standard_Real distmin = RealLast(); - Standard_Real uprev = 0.0, vprev = 0.0, prm = 0.0, dist = 0.0; + Standard_Real uprev = 0.,vprev = 0., prm = 0., dist = 0.; if(byinter) previousP.ParametersOnS(uprev,vprev); pt2d.SetCoord(sol(1),sol(2)); @@ -345,7 +345,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::PerformFirstSection Standard_Real trst = 0.; Standard_Boolean recadp,recadrst,recads; Standard_Real wp,wrst,ws; - Standard_Real U,V; + Standard_Real U = 0.,V = 0.; math_Vector infbound(1,3),supbound(1,3),tolerance(1,3); math_Vector solinvp(1,3),solinvrst(1,4),solinvs(1,3); Handle(Adaptor3d_HVertex) Vtxp,Vtxrst,Vtxs,Vtxc; @@ -512,12 +512,12 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func, return; } Blend_Status State = Blend_OnRst12; - TopAbs_State situonc,situons; - Standard_Boolean decroch; + TopAbs_State situonc = TopAbs_UNKNOWN, situons = TopAbs_UNKNOWN; + Standard_Boolean decroch = Standard_False; Standard_Boolean Arrive,recadp,recadrst,recads,echecrecad; Standard_Real wp,wrst,ws; - Standard_Real U,V; - Standard_Real trst = 0.; + Standard_Real U = 0.,V = 0.; + Standard_Real trst = 0.; math_Vector infbound(1,3),supbound(1,3); math_Vector parinit(1,3),tolerance(1,3); math_Vector solinvp(1,3),solinvrst(1,4),solinvs(1,3); diff --git a/src/BRepCheck/BRepCheck_Wire.cxx b/src/BRepCheck/BRepCheck_Wire.cxx index 25610f02f4..0fb2df20a8 100755 --- a/src/BRepCheck/BRepCheck_Wire.cxx +++ b/src/BRepCheck/BRepCheck_Wire.cxx @@ -1172,7 +1172,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F, f2-IP_ParamOnSecond > ::Precision::PConfusion() || IP_ParamOnSecond-l2 > ::Precision::PConfusion() ) continue; - Standard_Real tolvtt; + Standard_Real tolvtt = 0.; // Modified by Sergey KHROMOV - Mon Apr 15 12:34:22 2002 Begin if (!ConS.IsNull()) { P3d = ConS->Value(IP_ParamOnFirst); diff --git a/src/BRepClass3d/BRepClass3d_SClassifier.cxx b/src/BRepClass3d/BRepClass3d_SClassifier.cxx index d4758ee6c7..45ab28b49f 100755 --- a/src/BRepClass3d/BRepClass3d_SClassifier.cxx +++ b/src/BRepClass3d/BRepClass3d_SClassifier.cxx @@ -95,7 +95,7 @@ void BRepClass3d_SClassifier::PerformInfinitePoint(BRepClass3d_SolidExplorer& aS // 1 Standard_Boolean bFound, bFlag; Standard_Integer nump; - Standard_Real aParam, aU1, aV1, aU2, aV2; + Standard_Real aParam, aU1 = 0., aV1 = 0., aU2 = 0., aV2 = 0.; gp_Pnt A,B; gp_Dir aDN1, aDN2; TopoDS_Face aF1, aF2; @@ -274,7 +274,7 @@ void BRepClass3d_SClassifier::Perform(BRepClass3d_SolidExplorer& SolidExplorer, // That's why the main loop while is added. Standard_Boolean isFaultyLine = Standard_True; Standard_Integer anIndFace = 0; - Standard_Real parmin; + Standard_Real parmin = 0.; while (isFaultyLine) { if (anIndFace == 0) { diff --git a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx index dea6e55ec9..e39c17c03b 100755 --- a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx +++ b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx @@ -120,7 +120,7 @@ static void TRIM_INFINIT_EDGE(const TopoDS_Edge& S1, const TopoDS_Edge& S2, Topo Precision::IsInfinite(aLast2)) return; - Standard_Real Umin, Umax; + Standard_Real Umin = 0., Umax = 0.; Standard_Boolean bUmin, bUmax; bUmin = bUmax = Standard_False; @@ -259,7 +259,7 @@ static void TRIM_INFINIT_FACE(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const Standard_Boolean bRestrict = BRep_Tool::NaturalRestriction(aF); Standard_Real U1, V1, U2, V2; - Standard_Real Umin, Umax, Vmin, Vmax; + Standard_Real Umin = RealLast(), Umax = RealFirst(), Vmin = RealLast(), Vmax = RealFirst(); Standard_Boolean bUmin, bUmax, bVmin, bVmax; bUmin = bUmax = bVmin = bVmax = Standard_False; Standard_Boolean bIsTrim = Standard_False; diff --git a/src/BRepFeat/BRepFeat.cxx b/src/BRepFeat/BRepFeat.cxx index 7d6940a88b..539a279b55 100755 --- a/src/BRepFeat/BRepFeat.cxx +++ b/src/BRepFeat/BRepFeat.cxx @@ -579,11 +579,9 @@ TopoDS_Solid BRepFeat::Tool(const TopoDS_Shape& SRef, Sh.Orientation(TopAbs_FORWARD); -#ifdef DEB - TopAbs_Orientation orient; -#else + TopAbs_Orientation orient = TopAbs_FORWARD; -#endif + for (exp.Init(Sh,TopAbs_FACE); exp.More(); exp.Next()) { if (exp.Current().IsSame(Fac)) { orient = exp.Current().Orientation(); diff --git a/src/BRepFeat/BRepFeat_Form.cxx b/src/BRepFeat/BRepFeat_Form.cxx index c4d242262b..6ce9b8fcff 100755 --- a/src/BRepFeat/BRepFeat_Form.cxx +++ b/src/BRepFeat/BRepFeat_Form.cxx @@ -711,8 +711,10 @@ static void Descendants(const TopoDS_Shape&, TopTools_ListOfShape lshape; theBuilder.PartsOfTool(lshape); // - Standard_Real pbmin, pbmax, prmin, prmax; - Standard_Boolean flag1; + Standard_Real pbmin = RealLast(), pbmax = RealFirst(); + Standard_Real prmin = RealLast() - 2*Precision::Confusion(); + Standard_Real prmax = RealFirst() + 2*Precision::Confusion(); + Standard_Boolean flag1 = Standard_False; Handle(Geom_Curve) C; //--- Selection of pieces of tool to be preserved diff --git a/src/BRepFeat/BRepFeat_MakePrism.cxx b/src/BRepFeat/BRepFeat_MakePrism.cxx index 493ad8d7a2..18c0510840 100755 --- a/src/BRepFeat/BRepFeat_MakePrism.cxx +++ b/src/BRepFeat/BRepFeat_MakePrism.cxx @@ -1114,11 +1114,10 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase, exp1.Init(exp.Current(), TopAbs_VERTEX); if(!exp1.More()) { - FacRevolInfini = Standard_True; - break; + FacRevolInfini = Standard_True; + break; } } - if(!FacRevolInfini) BRepBndLib::Add(theSUntil,Box); } diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index 00686ec8eb..349db51c09 100755 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -1476,8 +1476,8 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ ) } Standard_Real MinSumDist = Precision::Infinite(); - Standard_Integer jmin, j, k, n; - Standard_Boolean forward; + Standard_Integer jmin = 1, j, k, n; + Standard_Boolean forward = Standard_False; if (i == myWork.Length() && myDegen2) { // last point section diff --git a/src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx b/src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx index 4ef720834d..766983f5d9 100755 --- a/src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx +++ b/src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx @@ -60,7 +60,7 @@ BRepFill_EdgeOnSurfLaw::BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path, Handle(Geom2dAdaptor_HCurve) AC2d; Handle(Adaptor3d_HCurveOnSurface) AC; Handle(BRepAdaptor_HSurface) AS; - Standard_Real First, Last; + Standard_Real First = 0., Last = 0.; Handle(GeomFill_Darboux) TLaw = new (GeomFill_Darboux)() ; Handle(GeomFill_CurveAndTrihedron) Law = new (GeomFill_CurveAndTrihedron) (TLaw); diff --git a/src/BRepFill/BRepFill_Evolved.cxx b/src/BRepFill/BRepFill_Evolved.cxx index c77341dcc2..bc6edb19a9 100755 --- a/src/BRepFill/BRepFill_Evolved.cxx +++ b/src/BRepFill/BRepFill_Evolved.cxx @@ -2826,7 +2826,7 @@ void ComputeIntervals (const TopTools_SequenceOfShape& VOnF, TopTools_SequenceOfShape& LastV ) { Standard_Integer IOnF = 1,IOnL = 1; - Standard_Real U1,U2; + Standard_Real U1 = 0.,U2; TopoDS_Shape V1,V2; if (!VS.IsNull()) { diff --git a/src/BRepFill/BRepFill_Filling.cxx b/src/BRepFill/BRepFill_Filling.cxx index 038aab0e98..6645231e06 100755 --- a/src/BRepFill/BRepFill_Filling.cxx +++ b/src/BRepFill/BRepFill_Filling.cxx @@ -497,7 +497,7 @@ void BRepFill_Filling::FindExtremitiesOfHoles(const TopTools_ListOfShape& WireLi while (! WireSeq.IsEmpty()) { TopoDS_Vertex MinVtx; - Standard_Integer i, MinInd; + Standard_Integer i, MinInd = 1; Standard_Boolean IsLast = Standard_False; Standard_Real MinAngle = M_PI; diff --git a/src/BRepFill/BRepFill_Generator.cxx b/src/BRepFill/BRepFill_Generator.cxx index e660d664ff..73e3a71726 100755 --- a/src/BRepFill/BRepFill_Generator.cxx +++ b/src/BRepFill/BRepFill_Generator.cxx @@ -81,7 +81,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, Standard_Integer IType = 0; // characteristics of the first edge - Standard_Real first1, last1, first2, last2, ff, ll; + Standard_Real first1 = 0., last1 = 0., first2, last2, ff, ll; TopLoc_Location loc; TopoDS_Vertex V1, V2; Handle(Geom_Curve) curv1, curv; @@ -542,7 +542,7 @@ void BRepFill_Generator::Perform() BRepTools_WireExplorer ex1,ex2; - Standard_Boolean wPoint1, wPoint2, uClosed, DegenFirst, DegenLast; + Standard_Boolean wPoint1, wPoint2, uClosed = Standard_False, DegenFirst = Standard_False, DegenLast = Standard_False; for ( Standard_Integer i = 1; i <= Nb-1; i++) { diff --git a/src/BRepFill/BRepFill_MultiLine.cxx b/src/BRepFill/BRepFill_MultiLine.cxx index c02477ba7e..ec008d9ad3 100755 --- a/src/BRepFill/BRepFill_MultiLine.cxx +++ b/src/BRepFill/BRepFill_MultiLine.cxx @@ -127,7 +127,7 @@ myKPart(0) TopLoc_Location L; TopExp_Explorer Exp; - Standard_Real Umin,Vmin,Umax,Vmax,U,V; + Standard_Real Umin = 0.,Vmin = 0.,Umax = 0.,Vmax = 0.,U,V; gp_Pnt2d P1,P2; gp_Vec DZ; gp_Pnt P; diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index 27d2a0c0b9..2b515f3bc8 100755 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -1412,8 +1412,8 @@ void BRepFill_OffsetWire::FixHoles() Pf = BRep_Tool::Pnt(Vf); Pl = BRep_Tool::Pnt(Vl); Standard_Real DistF = RealLast(), DistL = RealLast(); - Standard_Integer IndexF, IndexL; - Standard_Boolean IsFirstF, IsFirstL; + Standard_Integer IndexF = 1, IndexL = 1; + Standard_Boolean IsFirstF = Standard_False, IsFirstL = Standard_False; for (Standard_Integer i = 2; i <= UnclosedWires.Length(); i++) { TopoDS_Wire aWire = TopoDS::Wire( UnclosedWires(i) ); diff --git a/src/BRepFill/BRepFill_SectionPlacement.cxx b/src/BRepFill/BRepFill_SectionPlacement.cxx index 96e4de5b16..7055ec7769 100755 --- a/src/BRepFill/BRepFill_SectionPlacement.cxx +++ b/src/BRepFill/BRepFill_SectionPlacement.cxx @@ -107,7 +107,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, Standard_Integer ii; Standard_Integer Ind1 = 0, Ind2 = 0; Standard_Boolean Bof, isVertex = Standard_False; - Standard_Real First, Last; + Standard_Real First = 0., Last = 0.; TopExp_Explorer Ex; TopoDS_Edge E; TopoDS_Vertex V; diff --git a/src/BRepLib/BRepLib_MakeFace.cxx b/src/BRepLib/BRepLib_MakeFace.cxx index 2e9f8cbcb0..5c7d9cd5a8 100755 --- a/src/BRepLib/BRepLib_MakeFace.cxx +++ b/src/BRepLib/BRepLib_MakeFace.cxx @@ -588,7 +588,10 @@ void BRepLib_MakeFace::Init(const Handle(Geom_Surface)& SS, Handle(Geom_Curve) Cumin,Cumax,Cvmin,Cvmax; Standard_Boolean Dumin,Dumax,Dvmin,Dvmax; Dumin = Dumax = Dvmin = Dvmax = Standard_False; - Standard_Real uminTol, umaxTol, vminTol, vmaxTol; + Standard_Real uminTol = Precision::Confusion(), + umaxTol = Precision::Confusion(), + vminTol = Precision::Confusion(), + vmaxTol = Precision::Confusion(); if (!umininf) { Cumin = S->UIso(UMin); diff --git a/src/BRepMesh/BRepMesh_Classifier.cxx b/src/BRepMesh/BRepMesh_Classifier.cxx index 03ce5db890..c553afea28 100755 --- a/src/BRepMesh/BRepMesh_Classifier.cxx +++ b/src/BRepMesh/BRepMesh_Classifier.cxx @@ -539,7 +539,7 @@ BRepMesh_Classifier::BRepMesh_Classifier(const TopoDS_Face& theFace, Standard_Integer k = 1; for (Standard_Integer i = 1; i <= aNbWires; i++) { - Standard_Real x1, y1, x2, y2, aXstart, aYstart; + Standard_Real x1 = 0., y1 = 0., x2, y2, aXstart = 0., aYstart = 0.; const Standard_Integer aLen = aWireLength(i) + 1; for (Standard_Integer j = 1; j <= aLen; j++) { diff --git a/src/BRepMesh/BRepMesh_IncrementalMesh.cxx b/src/BRepMesh/BRepMesh_IncrementalMesh.cxx index 50c349d92c..9e4853c4cc 100755 --- a/src/BRepMesh/BRepMesh_IncrementalMesh.cxx +++ b/src/BRepMesh/BRepMesh_IncrementalMesh.cxx @@ -343,7 +343,7 @@ void BRepMesh_IncrementalMesh::Update(const TopoDS_Edge& E) Handle(Poly_Triangulation) T, TNull; Handle(Poly_PolygonOnTriangulation) Poly, NullPoly; Standard_Boolean found = Standard_False; - Standard_Real defedge; + Standard_Real defedge = Precision::Confusion(); Standard_Real cdef = 1.; BRep_Builder B; Standard_Boolean defined = Standard_False; diff --git a/src/BRepOffset/BRepOffset_Inter3d.cxx b/src/BRepOffset/BRepOffset_Inter3d.cxx index ea1bc30fba..a5e5658cdf 100755 --- a/src/BRepOffset/BRepOffset_Inter3d.cxx +++ b/src/BRepOffset/BRepOffset_Inter3d.cxx @@ -45,6 +45,7 @@ #include #include #include +#include @@ -141,8 +142,8 @@ static void SelectEdge (const TopoDS_Face& /*F*/, Standard_Integer i; Standard_Real aTol = BRep_Tool::Tolerance(EI); Standard_Boolean isMinFound = Standard_False; - Standard_Real aSqrDist1; - Standard_Real aSqrDist2; + Standard_Real aSqrDist1 = Precision::Infinite(); + Standard_Real aSqrDist2 = Precision::Infinite(); anExt.Initialize(Ad2, Fst, Lst, aTol); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx index cf3c5f5efe..940d1cab57 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx @@ -814,7 +814,7 @@ void BRepOffsetAPI_MiddlePath::Build() { gp_Ax1 theAxis; gp_Dir theDir1, theDir2; - Standard_Real theAngle; + Standard_Real theAngle = 0.; gp_Vec theTangent; Standard_Boolean SimilarArcs = Standard_True; for (j = 1; j <= myPaths.Length(); j++) @@ -890,7 +890,12 @@ void BRepOffsetAPI_MiddlePath::Build() theAx2 = gp_Ax2(theCenterOfCirc, theAxis.Direction(), Vec1); theCircle = GC_MakeCircle(theAx2, Vec1.Magnitude()); } - MidEdges(i) = BRepLib_MakeEdge(theCircle, 0., theAngle); + BRepLib_MakeEdge aME (theCircle, 0., theAngle); + aME.Build(); + + MidEdges(i) = aME.IsDone() ? + aME.Shape() : + TopoDS_Edge(); } } } diff --git a/src/BRepTest/BRepTest_CurveCommands.cxx b/src/BRepTest/BRepTest_CurveCommands.cxx index 9ec91692db..9a771eb3e8 100755 --- a/src/BRepTest/BRepTest_CurveCommands.cxx +++ b/src/BRepTest/BRepTest_CurveCommands.cxx @@ -389,7 +389,7 @@ static Standard_Integer mk2dcurve(Draw_Interpretor& di, TopoDS_Edge E = TopoDS::Edge(S); TopLoc_Location L; - Standard_Real f,l; + Standard_Real f = 0., l = 0.; Handle(Geom2d_Curve) C; Handle(Geom_Surface) Surf; diff --git a/src/BRepTools/BRepTools_ShapeSet.cxx b/src/BRepTools/BRepTools_ShapeSet.cxx index eef394c601..8531773ee4 100755 --- a/src/BRepTools/BRepTools_ShapeSet.cxx +++ b/src/BRepTools/BRepTools_ShapeSet.cxx @@ -21,7 +21,7 @@ // Modifed: Portage NT 7-5-97 DPF (strcasecmp) #include - +#include #include #include @@ -823,7 +823,7 @@ void BRepTools_ShapeSet::ReadGeometry(const TopAbs_ShapeEnum T, { // Read the geometry - Standard_Integer val,c,pc,pc2,s,s2,l,l2,t, pt, pt2; + Standard_Integer val,c,pc,pc2 = 0,s,s2,l,l2,t, pt, pt2 = 0; Standard_Real tol,X,Y,Z,first,last,p1,p2; Standard_Real PfX,PfY,PlX,PlY; gp_Pnt2d aPf, aPl; diff --git a/src/BinTools/BinTools_ShapeSet.cxx b/src/BinTools/BinTools_ShapeSet.cxx index 4c41df54ac..4eddfb20d2 100755 --- a/src/BinTools/BinTools_ShapeSet.cxx +++ b/src/BinTools/BinTools_ShapeSet.cxx @@ -759,8 +759,8 @@ void BinTools_ShapeSet::ReadGeometry(const TopAbs_ShapeEnum T, { // Read the geometry - Standard_Integer val, c,pc,pc2,s,s2,l,l2,t, pt, pt2; - Standard_Real tol,X,Y,Z,first,last,p1,p2; + Standard_Integer val, c,pc,pc2 = 0,s,s2,l,l2,t, pt, pt2 = 0; + Standard_Real tol,X,Y,Z,first,last,p1 = 0.,p2; Standard_Real PfX,PfY,PlX,PlY; gp_Pnt2d aPf, aPl; Standard_Boolean closed, bval; diff --git a/src/Blend/Blend_CSWalking_2.gxx b/src/Blend/Blend_CSWalking_2.gxx index 9dd6703ed5..374ec5b5f7 100755 --- a/src/Blend/Blend_CSWalking_2.gxx +++ b/src/Blend/Blend_CSWalking_2.gxx @@ -41,11 +41,8 @@ Blend_Status Blend_CSWalking::TestArret(Blend_CSFunction& Function, gp_Pnt2d pt2d; Standard_Real pOnC; Blend_Status State1,State2; -#ifndef DEB IntSurf_TypeTrans tras = IntSurf_Undecided; -#else - IntSurf_TypeTrans tras; -#endif + if (Function.IsSolution(Sol,tolesp)) { pt1 = Function.PointOnS(); diff --git a/src/Blend/Blend_Walking_1.gxx b/src/Blend/Blend_Walking_1.gxx index e9afc14999..1dffbb597f 100755 --- a/src/Blend/Blend_Walking_1.gxx +++ b/src/Blend/Blend_Walking_1.gxx @@ -260,8 +260,8 @@ Standard_Boolean Blend_Walking::PerformFirstSection math_Vector tolerance(1,4),infbound(1,4),supbound(1,4); math_Vector solrst1(1,4),solrst2(1,4); TheExtremity Ext1,Ext2; - Standard_Integer Index1,Index2,nbarc; - Standard_Boolean Isvtx1,Isvtx2; + Standard_Integer Index1 = 0, Index2 = 0, nbarc; + Standard_Boolean Isvtx1 = Standard_False, Isvtx2 = Standard_False; TheVertex Vtx1,Vtx2; gp_Pnt2d p2d; diff --git a/src/Blend/Blend_Walking_2.gxx b/src/Blend/Blend_Walking_2.gxx index c1a07e3b87..2768847581 100755 --- a/src/Blend/Blend_Walking_2.gxx +++ b/src/Blend/Blend_Walking_2.gxx @@ -189,11 +189,7 @@ Blend_Status Blend_Walking::CheckDeflection const Standard_Real CosRef2D = 0.88; // correspond a 25 d Standard_Real Norme, Cosi, Cosi2; -#ifndef DEB Standard_Real prevNorme = 0.; -#else - Standard_Real prevNorme; -#endif Standard_Real FlecheCourante; Standard_Real Du,Dv,Duv; Standard_Real tolu,tolv; diff --git a/src/Blend/Blend_Walking_3.gxx b/src/Blend/Blend_Walking_3.gxx index bc662e4c84..92e50002a1 100755 --- a/src/Blend/Blend_Walking_3.gxx +++ b/src/Blend/Blend_Walking_3.gxx @@ -29,7 +29,7 @@ Standard_Integer Blend_Walking::ArcToRecadre(const Standard_Boolean OnFirst, Standard_Boolean ok = Standard_False; Standard_Boolean byinter = (line->NbPoints() != 0), okinter = 0; Standard_Real distmin = RealLast(); - Standard_Real uprev = 0.0, vprev = 0.0, prm = 0.0, dist = 0.0; + Standard_Real uprev = 0.,vprev = 0., prm = 0., dist = 0.; Handle(TheTopolTool) Iter; if (OnFirst) { @@ -86,11 +86,8 @@ Standard_Boolean Blend_Walking::Recadre(Blend_FuncInv& FuncInv, Standard_Boolean jalons_Trouve = Standard_False; Standard_Boolean recadre = Standard_True, ok; Standard_Boolean byinter = (line->NbPoints() != 0); -#ifndef DEB Standard_Integer LeJalon = 0; -#else - Standard_Integer LeJalon; -#endif + Standard_Integer nbarc; Standard_Real dist,prm,pmin, vtol; gp_Pnt2d pt2d, lastpt2d; diff --git a/src/Blend/Blend_Walking_4.gxx b/src/Blend/Blend_Walking_4.gxx index 2fb2e541ff..a644b96c76 100755 --- a/src/Blend/Blend_Walking_4.gxx +++ b/src/Blend/Blend_Walking_4.gxx @@ -91,9 +91,9 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, Blend_Status State = Blend_OnRst12; TopAbs_State situ1 =TopAbs_IN,situ2=TopAbs_IN; Standard_Real w1,w2; - Standard_Integer Index1,Index2,nbarc; + Standard_Integer Index1 = 0, Index2 = 0, nbarc; Standard_Boolean Arrive,recad1,recad2, control; - Standard_Boolean Isvtx1,Isvtx2,echecrecad; + Standard_Boolean Isvtx1 = Standard_False, Isvtx2 = Standard_False, echecrecad; gp_Pnt2d p2d; math_Vector tolerance(1,4),infbound(1,4),supbound(1,4),parinit(1,4); math_Vector solrst1(1,4),solrst2(1,4); @@ -559,12 +559,3 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, } } - - - - - - - - - diff --git a/src/ChFi3d/ChFi3d_Builder_0.cxx b/src/ChFi3d/ChFi3d_Builder_0.cxx index 0ce56466e5..211cbc843c 100755 --- a/src/ChFi3d/ChFi3d_Builder_0.cxx +++ b/src/ChFi3d/ChFi3d_Builder_0.cxx @@ -2122,7 +2122,7 @@ void ChFi3d_FilDS(const Standard_Integer SolidIndex, Standard_Integer Iarc1 = 0,Iarc2 = 0; TopAbs_Orientation trafil1 = TopAbs_FORWARD, trafil2 = TopAbs_FORWARD; Standard_Integer IcFil1,IcFil2,Isurf,Ishape1,Ishape2; - Standard_Real Pardeb,Parfin; + Standard_Real Pardeb = 0.,Parfin = 0.; TopAbs_Orientation ET1; Handle(TopOpeBRepDS_CurvePointInterference) Interfp1,Interfp2; Handle(TopOpeBRepDS_SurfaceCurveInterference) Interfc1,Interfc2; @@ -3052,7 +3052,7 @@ Standard_Boolean ChFi3d_ComputeCurves(Handle(Adaptor3d_HSurface)& S1, //in the direction of the start/end line. gp_Vec Vint, Vref(pdeb,pfin); gp_Pnt Pbid; - Standard_Real Udeb,Ufin; + Standard_Real Udeb = 0.,Ufin = 0.; Standard_Real tolr1,tolr2; tolr1 = tolr2 = tolreached = tol3d; if((S1->GetType() == GeomAbs_Cylinder && S2->GetType() == GeomAbs_Plane)|| @@ -3893,7 +3893,7 @@ Standard_EXPORT Standard_Boolean periodic, Bof, checkdeb, cepadur,bIsSmooth; Standard_Integer IEdge,IF,IL,nbed, iToApproxByC2; - Standard_Real WF, WL, Wrefdeb, Wreffin,nwf,nwl,period,pared,tolpared; + Standard_Real WF, WL, Wrefdeb, Wreffin,nwf,nwl,period,pared = 0.,tolpared; Standard_Real First, Last, epsV, urefdeb, tolrac; GeomAbs_Shape aContinuity; gp_Pnt PDeb, PFin, Bout; diff --git a/src/ChFi3d/ChFi3d_Builder_2.cxx b/src/ChFi3d/ChFi3d_Builder_2.cxx index 4083101906..ae743a746e 100755 --- a/src/ChFi3d/ChFi3d_Builder_2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_2.cxx @@ -1890,11 +1890,11 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine Handle(BRepAdaptor_HCurve2d) HC1,HC2; Handle(BRepAdaptor_HCurve2d) HCref1 = new BRepAdaptor_HCurve2d(); Handle(BRepAdaptor_HCurve2d) HCref2 = new BRepAdaptor_HCurve2d(); - Standard_Boolean decroch1 = 0, decroch2 = 0; - Standard_Boolean RecP1 = 0, RecS1 = 0, RecRst1 = 0, obstacleon1 = 0; - Standard_Boolean RecP2 = 0, RecS2 = 0, RecRst2 = 0, obstacleon2 = 0; + Standard_Boolean decroch1 = Standard_False, decroch2 = Standard_False; + Standard_Boolean RecP1 = Standard_False, RecS1 = Standard_False, RecRst1 = Standard_False, obstacleon1 = Standard_False; + Standard_Boolean RecP2 = Standard_False, RecS2 = Standard_False, RecRst2 = Standard_False, obstacleon2 = Standard_False; gp_Pnt2d pp1,pp2,pp3,pp4; - Standard_Real w1,w2; + Standard_Real w1 = 0.,w2 = 0.; math_Vector Soldep(1,4); math_Vector SoldepCS(1,3); math_Vector SoldepCC(1,2); diff --git a/src/ChFi3d/ChFi3d_Builder_6.cxx b/src/ChFi3d/ChFi3d_Builder_6.cxx index 20bec9e27c..1e79f9adbc 100755 --- a/src/ChFi3d/ChFi3d_Builder_6.cxx +++ b/src/ChFi3d/ChFi3d_Builder_6.cxx @@ -955,7 +955,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData Standard_Real MS = MaxStep; Standard_Integer again = 0; Standard_Integer nbptmin = 3; //jlr - Standard_Integer Nbpnt = 0; + Standard_Integer Nbpnt = 1; // the initial solution is reframed if necessary. math_Vector ParSol(1,3); Standard_Real NewFirst = PFirst; @@ -2073,7 +2073,7 @@ Standard_Boolean ChFi3d_Builder::SimulData Standard_Real MS = MaxStep; Standard_Real TolGuide=tolguide, TolEsp = tolesp; - Standard_Integer Nbpnt; + Standard_Integer Nbpnt = 0; Standard_Real SpFirst = HGuide->FirstParameter(); Standard_Real SpLast = HGuide->LastParameter(); Standard_Boolean reverse = (!Forward || Inside); diff --git a/src/ChFi3d/ChFi3d_Builder_C1.cxx b/src/ChFi3d/ChFi3d_Builder_C1.cxx index 18e7db28d1..83cd64dbc2 100755 --- a/src/ChFi3d/ChFi3d_Builder_C1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C1.cxx @@ -819,7 +819,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index, TopoDS_Edge edgecouture; Standard_Boolean couture,intcouture=Standard_False;; - Standard_Real tolreached; + Standard_Real tolreached = tolesp; Standard_Real par1 =0.,par2 =0.; Standard_Integer indpt = 0,Icurv1 = 0,Icurv2 = 0; Handle(Geom_TrimmedCurve) curv1,curv2; @@ -3795,7 +3795,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index) TopoDS_Edge Arcpiv,Arcprol,Arcspine,Arcprolbis; if(isfirst) Arcspine = spine->Edges(1); else Arcspine = spine->Edges(spine->NbEdges()); - TopAbs_Orientation OArcprolbis; + TopAbs_Orientation OArcprolbis = TopAbs_FORWARD; TopAbs_Orientation OArcprolv = TopAbs_FORWARD, OArcprolop = TopAbs_FORWARD; Standard_Integer ICurve; Handle(BRepAdaptor_HSurface) HBs = new BRepAdaptor_HSurface(); @@ -3983,7 +3983,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index) TopoDS_Edge edgecouture; Standard_Boolean couture,intcouture=Standard_False;; - Standard_Real tolreached; + Standard_Real tolreached = tolesp; Standard_Real par1 = 0.,par2 = 0.; Standard_Integer indpt =0,Icurv1 =0,Icurv2 =0; Handle(Geom_TrimmedCurve) curv1,curv2; @@ -4203,7 +4203,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index) // Above all the points cut the points with the edge of the spine. Standard_Integer IArcspine = DStr.AddShape(Arcspine); Standard_Integer IVtx = DStr.AddShape(Vtx); - TopAbs_Orientation OVtx2; + TopAbs_Orientation OVtx2 = TopAbs_FORWARD; TopAbs_Orientation OVtx = TopAbs_FORWARD; for(ex.Init(Arcspine.Oriented(TopAbs_FORWARD),TopAbs_VERTEX); ex.More(); ex.Next()){ diff --git a/src/ChFi3d/ChFi3d_Builder_C2.cxx b/src/ChFi3d/ChFi3d_Builder_C2.cxx index 9bdbd459df..f3e48687f6 100755 --- a/src/ChFi3d/ChFi3d_Builder_C2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C2.cxx @@ -327,7 +327,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer Reduce(UIntPC1,UIntPC2,HS1,HS2); } - Standard_Real tolreached; + Standard_Real tolreached = tolesp; if (IFaCo1 == 1 && !ChFi3d_ComputeCurves(HS1,HS2,Pardeb,Parfin,Gc, PGc1,PGc2,tolesp,tol2d,tolreached)) { diff --git a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx index b650f0093e..46469058c6 100755 --- a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx +++ b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx @@ -1042,13 +1042,13 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, ChFiDS_ListIteratorOfListOfStripe It; Handle(ChFiDS_Stripe) cd2,cdbid,cnext; TopoDS_Face face; - Standard_Integer jfp,ii; + Standard_Integer jfp = 0,ii; Standard_Integer ic,icplus,icmoins,icplus2, sense,index,indice,isurf1,isurf2; - Standard_Integer cbplus=0, n3d=0,IVtx,nb; + Standard_Integer cbplus=0, n3d=0,IVtx = 0,nb; Standard_Boolean sameside,trouve,isfirst; Standard_Real pardeb ,parfin,xdir,ydir; - Standard_Real tolapp=1.e-4,maxapp,maxapp1,avedev; + Standard_Real tolapp=1.e-4,maxapp = 0.,maxapp1 = 0.,avedev; Handle (TopOpeBRepDS_CurvePointInterference) Interfp1, Interfp2; Handle (TopOpeBRepDS_SurfaceCurveInterference) Interfc; Handle(Geom_Curve) Curv3d; @@ -1452,9 +1452,9 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, oksea.SetValue(ic, Standard_False); } else { - Standard_Integer jf1; - Standard_Integer i1,i2; - Standard_Real pa1,pa2; + Standard_Integer jf1 = 0; + Standard_Integer i1 = 0,i2 = 0; + Standard_Real pa1 = 0.,pa2; Standard_Boolean ok; Handle(ChFiDS_Stripe) strip; Standard_Real angedg; @@ -1824,7 +1824,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, // Then this courbe3d is projected on all faces (nbface) that // separate icmoins and indfin Standard_Integer nbface = 0; - Standard_Real error; + Standard_Real error = 0.; TColGeom2d_Array1OfCurve proj2d1(0,size); TColGeom2d_Array1OfCurve proj2d2(0,size); TColGeom_Array1OfCurve cproj1(0,size); diff --git a/src/ChFi3d/ChFi3d_Builder_SpKP.cxx b/src/ChFi3d/ChFi3d_Builder_SpKP.cxx index ecc5ebf560..1a02f47ac9 100755 --- a/src/ChFi3d/ChFi3d_Builder_SpKP.cxx +++ b/src/ChFi3d/ChFi3d_Builder_SpKP.cxx @@ -448,7 +448,7 @@ static Standard_Real ResetProl(const TopOpeBRepDS_DataStructure& DStr, const Handle(Geom_Surface)& surf = DStr.Surface(CD->Surf()).Surface(); Standard_Real par = 0., x, y; if(!isfirst) par = edglen; - Standard_Real sppar; + Standard_Real sppar = 0.; for (Standard_Integer i = 1; i <= 2; i++) { CD->ChangeInterference(i).SetParameter(par,isfirst); Handle(Geom2d_Curve) pc = CD->Interference(i).PCurveOnSurf(); diff --git a/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx b/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx index d9b72d27f4..e22c8400e7 100755 --- a/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx @@ -477,7 +477,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) TopAbs_Orientation oriSFF1 = st1->Orientation(IFaArc1); bid = 1; bid = ChFi3d::NextSide(ori,OFF1,oriS,oriSFF1,bid); - TopAbs_Orientation op1,op2; + TopAbs_Orientation op1 = TopAbs_FORWARD,op2 = TopAbs_FORWARD; if(yapiv) bid = ChFi3d::ConcaveSide(BRS1,BRS2,pivot,op1,op2); op1 = TopAbs::Reverse(op1); op2 = TopAbs::Reverse(op2); diff --git a/src/ChFiDS/ChFiDS_FilSpine.cxx b/src/ChFiDS/ChFiDS_FilSpine.cxx index 71dad8256e..6329cfe80b 100755 --- a/src/ChFiDS/ChFiDS_FilSpine.cxx +++ b/src/ChFiDS/ChFiDS_FilSpine.cxx @@ -314,7 +314,7 @@ Standard_Real ChFiDS_FilSpine::Radius(const Standard_Integer IE)const Standard_Real Uf = FirstParameter(IE); Standard_Real Ul = LastParameter(IE); - Standard_Real StartRad, par, rad; + Standard_Real StartRad = 0., par, rad; Standard_Integer i; for (i = 1; i < parandrad.Length(); i++) { diff --git a/src/Contap/Contap_ContourGen_2.gxx b/src/Contap/Contap_ContourGen_2.gxx index 52fbbd3e9f..5dc9d8aac6 100755 --- a/src/Contap/Contap_ContourGen_2.gxx +++ b/src/Contap/Contap_ContourGen_2.gxx @@ -861,7 +861,7 @@ void ComputeInternalPointsOnRstr gp_Pnt2d p2d; gp_Vec2d d2d; Standard_Boolean found,ok = Standard_False,toutvu,solution; - Standard_Real paramp,paraminf,paramsup,toler; + Standard_Real paramp = 0.,paraminf,paramsup,toler; if (Line.TypeContour() != Contap_Restriction) { return; diff --git a/src/Contap/Contap_ContourGen_3.gxx b/src/Contap/Contap_ContourGen_3.gxx index 7ac1d5749d..fb5b95b5f1 100755 --- a/src/Contap/Contap_ContourGen_3.gxx +++ b/src/Contap/Contap_ContourGen_3.gxx @@ -156,7 +156,7 @@ IntSurf_TypeTrans ComputeTransitionOngpLine gp_Pnt P; gp_Vec T; ElCLib::D1(0.0,L,P,T); - Standard_Real u,v; + Standard_Real u = 0.,v = 0.; switch (typS) { case GeomAbs_Cylinder: { ElSLib::Parameters(TheSurfaceTool::Cylinder(Surf),P,u,v); @@ -186,7 +186,7 @@ IntSurf_TypeTrans ComputeTransitionOngpCircle gp_Pnt P; gp_Vec T; ElCLib::D1(0.0,C,P,T); - Standard_Real u,v; + Standard_Real u = 0.,v = 0.; switch (typS) { case GeomAbs_Cylinder: { ElSLib::Parameters(TheSurfaceTool::Cylinder(Surf),P,u,v); diff --git a/src/Convert/Convert_ConicToBSplineCurve.cxx b/src/Convert/Convert_ConicToBSplineCurve.cxx index 056ac802ff..30ff17a235 100755 --- a/src/Convert/Convert_ConicToBSplineCurve.cxx +++ b/src/Convert/Convert_ConicToBSplineCurve.cxx @@ -344,17 +344,17 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin( q_param, param ; - Standard_Integer num_poles, + Standard_Integer num_poles = 0, ii, jj, - num_knots=0, - num_spans=0, + num_knots = 1, + num_spans = 1, num_flat_knots, num_temp_knots, - temp_degree=0, + temp_degree = 0, tgt_theta_flag, num_temp_poles, - order ; + order = 0; Convert_CosAndSinEvalFunction *EvaluatorPtr=NULL ; diff --git a/src/DBRep/DBRep.cxx b/src/DBRep/DBRep.cxx index 38d598c308..f207074b03 100755 --- a/src/DBRep/DBRep.cxx +++ b/src/DBRep/DBRep.cxx @@ -720,11 +720,7 @@ static Standard_Integer orientation(Draw_Interpretor& , { if (n <= 1) return 1; Standard_Integer cas = 0; -#ifdef DEB - TopAbs_Orientation ori; -#else TopAbs_Orientation ori=TopAbs_FORWARD; -#endif Standard_Integer last = n; if (!strcasecmp(a[0],"orientation")) { if (n <= 2) return 1; diff --git a/src/DDF/DDF_IOStream.cxx b/src/DDF/DDF_IOStream.cxx index 83fbbf9292..bb1b70da58 100755 --- a/src/DDF/DDF_IOStream.cxx +++ b/src/DDF/DDF_IOStream.cxx @@ -303,7 +303,7 @@ void DDF_IOStream::ReadChar(TCollection_AsciiString& buffer, const Standard_Inte void DDF_IOStream::ReadString(TCollection_AsciiString& buffer) { - char c; + char c = '\0'; Standard_Boolean IsEnd = Standard_False; buffer.Clear(); @@ -329,7 +329,7 @@ void DDF_IOStream::ReadString(TCollection_AsciiString& buffer) void DDF_IOStream::ReadWord(TCollection_AsciiString& buffer) { - char c; + char c = '\0'; Standard_Boolean IsEnd = Standard_False; buffer.Clear(); diff --git a/src/Draft/Draft_Modification_1.cxx b/src/Draft/Draft_Modification_1.cxx index a2ca0bff83..a7800c5417 100755 --- a/src/Draft/Draft_Modification_1.cxx +++ b/src/Draft/Draft_Modification_1.cxx @@ -1008,8 +1008,8 @@ void Draft_Modification::Perform () theSurf = S2; } if(detrompeur != 0 && detrompeur != 4) { - Standard_Real ul, vl, uf, vf; - Standard_Real ufprim, ulprim, vfprim, vlprim; + Standard_Real ul = 0., vl = 0., uf = 0., vf = 0.; + Standard_Real ufprim = 0., ulprim = 0., vfprim = 0., vlprim = 0.; if(theSurf->DynamicType() == STANDARD_TYPE(Geom_Plane)) { gp_Pln pl = Handle(Geom_Plane)::DownCast(S2)->Pln(); diff --git a/src/Draw/Draw.cxx b/src/Draw/Draw.cxx index d654dd22e6..7780a1357c 100755 --- a/src/Draw/Draw.cxx +++ b/src/Draw/Draw.cxx @@ -276,7 +276,7 @@ void Draw_Appli(Standard_Integer argc, char** argv,const FDraw_InitAppli Draw_In // init X window and create display // ***************************************************************** #ifdef WNT - HWND hWnd; + HWND hWnd = NULL; #endif if (!Draw_Batch) diff --git a/src/Draw/Draw_GraphicCommands.cxx b/src/Draw/Draw_GraphicCommands.cxx index 13d485b99b..b7dcd059f7 100755 --- a/src/Draw/Draw_GraphicCommands.cxx +++ b/src/Draw/Draw_GraphicCommands.cxx @@ -138,7 +138,7 @@ static Standard_Integer zoom(Draw_Interpretor& , Standard_Integer n, const char* static Standard_Integer wzoom(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - Standard_Integer id,X,Y,W,H,X1,Y1,X2,Y2,b; + Standard_Integer id,X,Y,W,H,X1,Y1,X2 = 0,Y2 = 0,b; Standard_Real dX1,dY1,dX2,dY2,zx,zy; if(argc != 1 && argc != 6) { diff --git a/src/DrawTrSurf/DrawTrSurf.cxx b/src/DrawTrSurf/DrawTrSurf.cxx index 1950df77f5..37b3ca136b 100755 --- a/src/DrawTrSurf/DrawTrSurf.cxx +++ b/src/DrawTrSurf/DrawTrSurf.cxx @@ -1777,7 +1777,7 @@ static Handle(Draw_Drawable3D) pntrestore (istream& is) { Standard_Integer is3d; is >> is3d; - Standard_Real x,y,z; + Standard_Real x,y,z = 0.; if (is3d) is >> x >> y >> z; else diff --git a/src/Dynamic/Dynamic.cxx b/src/Dynamic/Dynamic.cxx index f7434e2d9b..0b80214724 100755 --- a/src/Dynamic/Dynamic.cxx +++ b/src/Dynamic/Dynamic.cxx @@ -43,11 +43,7 @@ Dynamic_ModeEnum Dynamic::Mode(const Standard_CString amode) { -#ifdef DEB -Dynamic_ModeEnum aMode; -#else Dynamic_ModeEnum aMode=Dynamic_IN; -#endif if (!strcasecmp(amode,"in" )) aMode = Dynamic_IN; else if(!strcasecmp(amode,"out" )) aMode = Dynamic_OUT; else if(!strcasecmp(amode,"inout" )) aMode = Dynamic_INOUT; diff --git a/src/Extrema/Extrema_GenExtCS.cxx b/src/Extrema/Extrema_GenExtCS.cxx index 3b2639ce52..b0855037bc 100755 --- a/src/Extrema/Extrema_GenExtCS.cxx +++ b/src/Extrema/Extrema_GenExtCS.cxx @@ -243,7 +243,7 @@ void Extrema_GenExtCS::Perform(const Adaptor3d_Curve& C, Standard_Real aCUSq = 0, aSUSq = 0, aSVSq = 0; while (aRestIterCount--) { - Standard_Real aMinCU, aMinSU, aMinSV, aMaxCU, aMaxSU, aMaxSV; + Standard_Real aMinCU = 0., aMinSU = 0., aMinSV = 0., aMaxCU = 0., aMaxSU = 0., aMaxSV = 0.; Standard_Real aMinSqDist = DBL_MAX, aMaxSqDist = -DBL_MAX; for (Standard_Integer aSUNom = 1; aSUNom < aSUDen; aSUNom += 2) { diff --git a/src/GCPnts/GCPnts_TangentialDeflection.gxx b/src/GCPnts/GCPnts_TangentialDeflection.gxx index d12bd588c7..7063058ad2 100755 --- a/src/GCPnts/GCPnts_TangentialDeflection.gxx +++ b/src/GCPnts/GCPnts_TangentialDeflection.gxx @@ -365,7 +365,7 @@ void GCPnts_TangentialDeflection::PerformCurve (const TheCurve& C) } else D0 (C, U2, CurrentPoint); //Point suivant - Standard_Real Coef, ACoef, FCoef; + Standard_Real Coef, ACoef = 0., FCoef = 0.; Standard_Boolean Correction, TooLarge, TooSmall; TooLarge = Standard_False; TooSmall = Standard_False; diff --git a/src/Geom/Geom_OffsetSurface.cxx b/src/Geom/Geom_OffsetSurface.cxx index 097e14386e..0f80fd467c 100755 --- a/src/Geom/Geom_OffsetSurface.cxx +++ b/src/Geom/Geom_OffsetSurface.cxx @@ -1502,7 +1502,7 @@ Handle(Geom_Surface) Geom_OffsetSurface::Surface() const Result.Nullify(); Handle(Standard_Type) TheType = basisSurf->DynamicType(); Standard_Boolean IsTrimmed; - Standard_Real U1, V1, U2, V2; + Standard_Real U1 = 0., V1 = 0., U2 = 0., V2 = 0.; // Preambule pour les surface trimmes if (TheType == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) { diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx index 43946ad949..42219c3501 100755 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx @@ -529,7 +529,7 @@ gp_Pnt2d Geom2dAdaptor_Curve::Value(const Standard_Real U) const { if ( (myTypeCurve == GeomAbs_BSplineCurve)&& (U==myFirst || U==myLast) ) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (U==myFirst) { myBspl->LocateU(myFirst, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; @@ -556,7 +556,7 @@ void Geom2dAdaptor_Curve::D0(const Standard_Real U, gp_Pnt2d& P) const { if ( (myTypeCurve == GeomAbs_BSplineCurve)&& (U==myFirst || U==myLast) ) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (U==myFirst) { myBspl->LocateU(myFirst, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; @@ -584,7 +584,7 @@ void Geom2dAdaptor_Curve::D1(const Standard_Real U, { if ( (myTypeCurve == GeomAbs_BSplineCurve)&& (U==myFirst || U==myLast) ) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (U==myFirst) { myBspl->LocateU(myFirst, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; @@ -612,7 +612,7 @@ void Geom2dAdaptor_Curve::D2(const Standard_Real U, { if ( (myTypeCurve == GeomAbs_BSplineCurve)&& (U==myFirst || U==myLast) ) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (U==myFirst) { myBspl->LocateU(myFirst, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; @@ -641,7 +641,7 @@ void Geom2dAdaptor_Curve::D3(const Standard_Real U, { if ( (myTypeCurve == GeomAbs_BSplineCurve) && (U==myFirst || U==myLast) ) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (U==myFirst) { myBspl->LocateU(myFirst, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; @@ -669,7 +669,7 @@ gp_Vec2d Geom2dAdaptor_Curve::DN(const Standard_Real U, { if ( (myTypeCurve == GeomAbs_BSplineCurve) && (U==myFirst || U==myLast) ) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (U==myFirst) { myBspl->LocateU(myFirst, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.cxx b/src/GeomAdaptor/GeomAdaptor_Curve.cxx index b4f4a7662d..ba1796967d 100755 --- a/src/GeomAdaptor/GeomAdaptor_Curve.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Curve.cxx @@ -522,7 +522,7 @@ gp_Pnt GeomAdaptor_Curve::Value(const Standard_Real U) const { if ( (myTypeCurve == GeomAbs_BSplineCurve)&& (U==myFirst || U==myLast) ) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (U==myFirst) { myBspl->LocateU(myFirst, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; @@ -547,7 +547,7 @@ void GeomAdaptor_Curve::D0(const Standard_Real U, gp_Pnt& P) const { if ( (myTypeCurve == GeomAbs_BSplineCurve)&& (U==myFirst || U==myLast) ) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (U==myFirst) { myBspl->LocateU(myFirst, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; @@ -574,7 +574,7 @@ void GeomAdaptor_Curve::D1(const Standard_Real U, gp_Pnt& P, gp_Vec& V) const { if ( (myTypeCurve == GeomAbs_BSplineCurve)&& (U==myFirst || U==myLast) ) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (U==myFirst) { myBspl->LocateU(myFirst, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; @@ -602,7 +602,7 @@ void GeomAdaptor_Curve::D2(const Standard_Real U, { if ( (myTypeCurve == GeomAbs_BSplineCurve)&& (U==myFirst || U==myLast) ) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (U==myFirst) { myBspl->LocateU(myFirst, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; @@ -631,7 +631,7 @@ void GeomAdaptor_Curve::D3(const Standard_Real U, { if ( (myTypeCurve == GeomAbs_BSplineCurve) && (U==myFirst || U==myLast) ) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (U==myFirst) { myBspl->LocateU(myFirst, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; @@ -659,7 +659,7 @@ gp_Vec GeomAdaptor_Curve::DN(const Standard_Real U, { if ( (myTypeCurve == GeomAbs_BSplineCurve) && (U==myFirst || U==myLast) ) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (U==myFirst) { myBspl->LocateU(myFirst, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; diff --git a/src/GeomFill/GeomFill_CorrectedFrenet.cxx b/src/GeomFill/GeomFill_CorrectedFrenet.cxx index 406116faa5..3fceb0dfc4 100755 --- a/src/GeomFill/GeomFill_CorrectedFrenet.cxx +++ b/src/GeomFill/GeomFill_CorrectedFrenet.cxx @@ -486,7 +486,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_CorrectedFrenet::Copy() const aT = gp_Vec(0, 0, 0); aN = gp_Vec(0, 0, 0); - Standard_Real angleAT, currParam, currStep = Step; + Standard_Real angleAT = 0., currParam, currStep = Step; Handle( Geom_Plane ) aPlane; Standard_Boolean isPlanar = Standard_False; diff --git a/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx b/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx index 5540963fce..888b5c6edb 100755 --- a/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx +++ b/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx @@ -111,7 +111,7 @@ GeomFill_GuideTrihedronPlan::GeomFill_GuideTrihedronPlan (const Handle(Adaptor3d // Box.Update(-0.1, -0.1, 0.1, 0.1); // Taille minimal gp_Vec Tangent,Normal,BiNormal; Standard_Integer ii; - Standard_Real t, DeltaG, w; + Standard_Real t, DeltaG, w = 0.; Standard_Real f = myCurve->FirstParameter(); Standard_Real l = myCurve->LastParameter(); diff --git a/src/GeomFill/GeomFill_TgtOnCoons.cxx b/src/GeomFill/GeomFill_TgtOnCoons.cxx index 654139b150..711d134fe4 100755 --- a/src/GeomFill/GeomFill_TgtOnCoons.cxx +++ b/src/GeomFill/GeomFill_TgtOnCoons.cxx @@ -42,7 +42,7 @@ GeomFill_TgtOnCoons::GeomFill_TgtOnCoons gp_Vec GeomFill_TgtOnCoons::Value(const Standard_Real W) const { - Standard_Real U,V,bid; + Standard_Real U = 0.,V = 0.,bid = 0.; switch (ibound){ case 0 : myK->Bound(1)->Bounds(V,bid); @@ -88,7 +88,7 @@ gp_Vec GeomFill_TgtOnCoons::Value(const Standard_Real W) const gp_Vec GeomFill_TgtOnCoons::D1(const Standard_Real W) const { - Standard_Real U,V,bid; + Standard_Real U = 0.,V = 0.,bid = 0.; switch (ibound){ case 0 : myK->Bound(1)->Bounds(V,bid); @@ -150,7 +150,7 @@ gp_Vec GeomFill_TgtOnCoons::D1(const Standard_Real W) const void GeomFill_TgtOnCoons::D1(const Standard_Real W, gp_Vec& T, gp_Vec& DT) const { - Standard_Real U,V,bid; + Standard_Real U = 0.,V = 0.,bid = 0.; switch (ibound){ case 0 : myK->Bound(1)->Bounds(V,bid); diff --git a/src/GeomLib/GeomLib.cxx b/src/GeomLib/GeomLib.cxx index b7cc55a056..31e54cf40b 100755 --- a/src/GeomLib/GeomLib.cxx +++ b/src/GeomLib/GeomLib.cxx @@ -1482,10 +1482,10 @@ void GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)& Surface, - Standard_Integer Cdeg, Cdim, NbP, Ksize, Psize ; + Standard_Integer Cdeg = 0, Cdim = 0, NbP = 0, Ksize = 0, Psize = 1; Standard_Integer ii, jj, ipole, Kount; Standard_Real Tbord, lambmin=Length; - Standard_Real * Padr; + Standard_Real * Padr = NULL; Standard_Boolean Ok; Handle(TColStd_HArray1OfReal) FKnots, Point, lambda, Tgte, Poles; @@ -1668,7 +1668,7 @@ void GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)& Surface, } // tableaux necessaires pour l'extension - Standard_Integer Ksize2 = Ksize+Cdeg, NbPoles, NbKnots; + Standard_Integer Ksize2 = Ksize+Cdeg, NbPoles, NbKnots = 0; TColStd_Array1OfReal FK(1, Ksize2) ; Standard_Real * FKRadr = &FK(1); diff --git a/src/GeometryTest/GeometryTest_APICommands.cxx b/src/GeometryTest/GeometryTest_APICommands.cxx index 6cb85a2fa9..f78e23d2f3 100755 --- a/src/GeometryTest/GeometryTest_APICommands.cxx +++ b/src/GeometryTest/GeometryTest_APICommands.cxx @@ -336,7 +336,7 @@ static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const Standard_Boolean S1 = Standard_False; Standard_Boolean S2 = Standard_False; - Standard_Real U1f,U1l,U2f,U2l,V1f,V1l,V2f,V2l; + Standard_Real U1f,U1l,U2f,U2l,V1f = 0.,V1l = 0.,V2f = 0.,V2l = 0.; GC1 = DrawTrSurf::GetCurve(a[1]); if ( GC1.IsNull()) { diff --git a/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx b/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx index 71a80049ba..ba8bb1f032 100755 --- a/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx @@ -337,11 +337,9 @@ static Standard_Integer smoothing (Draw_Interpretor& di,Standard_Integer n, cons // { Standard_Real Tolerance=0; -#ifdef DEB - AppParCurves_Constraint Constraint; -#else + AppParCurves_Constraint Constraint=AppParCurves_NoConstraint; -#endif + Handle(AppParCurves_HArray1OfConstraintCouple)TABofCC; TABofCC.Nullify(); Handle(AppDef_HArray1OfMultiPointConstraint) Points; @@ -506,11 +504,7 @@ static Standard_Integer smoothingbybezier (Draw_Interpretor& di, //============================================================================ { Standard_Real Tolerance=0; -#ifdef DEB - AppParCurves_Constraint Constraint; -#else - AppParCurves_Constraint Constraint=AppParCurves_NoConstraint; -#endif + AppParCurves_Constraint Constraint = AppParCurves_NoConstraint; Handle(AppParCurves_HArray1OfConstraintCouple)TABofCC; Handle(AppDef_HArray1OfMultiPointConstraint) Points; diff --git a/src/HLRAlgo/HLRAlgo_PolyAlgo.cxx b/src/HLRAlgo/HLRAlgo_PolyAlgo.cxx index 70e51915be..3abcab3395 100755 --- a/src/HLRAlgo/HLRAlgo_PolyAlgo.cxx +++ b/src/HLRAlgo/HLRAlgo_PolyAlgo.cxx @@ -220,7 +220,7 @@ void HLRAlgo_PolyAlgo::Update () TColStd_Array1OfTransient& Polyg = (*psd2)->PolyData(); Standard_Integer nbFace = Polyg.Upper(); Standard_Integer nbFaHi = 0; - Handle(HLRAlgo_PolyData)* pd; + Handle(HLRAlgo_PolyData)* pd = NULL; if(nbFace > 0) pd = (Handle(HLRAlgo_PolyData)*)&(Polyg.ChangeValue(1)); for (j = 1; j <= nbFace; j++) { diff --git a/src/HLRAlgo/HLRAlgo_PolyInternalData.cxx b/src/HLRAlgo/HLRAlgo_PolyInternalData.cxx index 953555c5c3..d0a56f32ca 100755 --- a/src/HLRAlgo/HLRAlgo_PolyInternalData.cxx +++ b/src/HLRAlgo/HLRAlgo_PolyInternalData.cxx @@ -161,8 +161,8 @@ void HLRAlgo_PolyInternalData::UpdateLinks Standard_Address& PINod) { Standard_Integer i,n1,n2; - Standard_Integer find,iiii,icsv; - Standard_Address A1,A2,A3,Nod1Indices,Nod2Indices,Seg2Indices,Tri2Indices; + Standard_Integer find,iiii,icsv = 0; + Standard_Address A1,A2,A3,Nod1Indices,Nod2Indices,Seg2Indices = NULL,Tri2Indices; Standard_Boolean newSeg = Standard_False; HLRAlgo_TriangleData* TD = &(((HLRAlgo_Array1OfTData*)TData)->ChangeValue(1)); @@ -455,7 +455,7 @@ HLRAlgo_PolyInternalData::UpdateLinks (const Standard_Integer ip1, Standard_Address& ) { Standard_Integer find,iiii,iisv,icsv,iip2 =0,cnx1 =0,cnx2 =0; - Standard_Address Seg1Indices,Seg2Indices; + Standard_Address Seg1Indices,Seg2Indices = NULL; Seg1Indices = 0; find = 0; iisv = 0; diff --git a/src/HLRAlgo/HLRAlgo_PolyShellData.cxx b/src/HLRAlgo/HLRAlgo_PolyShellData.cxx index 381f497df4..0985143f59 100755 --- a/src/HLRAlgo/HLRAlgo_PolyShellData.cxx +++ b/src/HLRAlgo/HLRAlgo_PolyShellData.cxx @@ -97,7 +97,7 @@ UpdateGlobalMinMax(const Standard_Address TotMinMax) } } Standard_Integer nbFace = myPolyg.Upper(); - Handle(HLRAlgo_PolyData)* pd; + Handle(HLRAlgo_PolyData)* pd = NULL; if(nbFace > 0) pd = (Handle(HLRAlgo_PolyData)*)&(myPolyg.ChangeValue(1)); for (Standard_Integer i = 1; i <= nbFace; i++) { diff --git a/src/HLRBRep/HLRBRep_PolyAlgo.cxx b/src/HLRBRep/HLRBRep_PolyAlgo.cxx index 4d02250e39..f658f22ecd 100755 --- a/src/HLRBRep/HLRBRep_PolyAlgo.cxx +++ b/src/HLRBRep/HLRBRep_PolyAlgo.cxx @@ -693,7 +693,7 @@ void HLRBRep_PolyAlgo::StoreShell (const TopoDS_Shape& Shape, { TopLoc_Location L; TopExp_Explorer exface,exedge; - Standard_Integer f,i,j; + Standard_Integer f = 0,i,j; Standard_Integer nbFaceShell = 0; Standard_Boolean reversed; Standard_Boolean closed = Standard_False; @@ -1228,7 +1228,7 @@ InitBiPointsWithConnexity (const Standard_Integer e, Standard_Integer iPol,nbPol,i1,i1p1,i1p2,i2,i2p1,i2p2; Standard_Real X1 ,Y1 ,Z1 ,X2 ,Y2 ,Z2 ; Standard_Real XTI1,YTI1,ZTI1,XTI2,YTI2,ZTI2; - Standard_Real U1,U2; + Standard_Real U1,U2 = 0.; Handle(Poly_PolygonOnTriangulation) HPol[2]; TopLoc_Location L; myBCurv.Initialize(E); @@ -2494,7 +2494,7 @@ HLRBRep_PolyAlgo::InsertOnOutLine (TColStd_Array1OfTransient& PID) TopLoc_Location L; Standard_Boolean insP3,mP3P1,IntOutL; Standard_Integer f,ip1,ip2,ip3;//, i; - Standard_Real U3,V3,coef3,X3,Y3,Z3; + Standard_Real U3,V3,coef3,X3 = 0.,Y3 = 0.,Z3 = 0.; const gp_Trsf& T = myProj.Transformation(); diff --git a/src/HLRBRep/HLRBRep_ShapeToHLR.cxx b/src/HLRBRep/HLRBRep_ShapeToHLR.cxx index 53ab5c8987..e60d809081 100755 --- a/src/HLRBRep/HLRBRep_ShapeToHLR.cxx +++ b/src/HLRBRep/HLRBRep_ShapeToHLR.cxx @@ -103,7 +103,7 @@ HLRBRep_ShapeToHLR::Load(const Handle(HLRTopoBRep_OutLiner)& S, // Create the data structure Handle(HLRBRep_Data) DS = new HLRBRep_Data (nbVert, nbEdge, nbFace); - HLRBRep_EdgeData* ed; + HLRBRep_EdgeData* ed = NULL; if(nbEdge != 0) ed = &(DS->EDataArray().ChangeValue(1)); // ed++; diff --git a/src/IGESAppli/IGESAppli_ToolLineWidening.cxx b/src/IGESAppli/IGESAppli_ToolLineWidening.cxx index 50f644b86f..0eeece18dd 100755 --- a/src/IGESAppli/IGESAppli_ToolLineWidening.cxx +++ b/src/IGESAppli/IGESAppli_ToolLineWidening.cxx @@ -37,7 +37,7 @@ void IGESAppli_ToolLineWidening::ReadOwnParams Standard_Integer tempCorneringCode; Standard_Integer tempExtensionFlag; Standard_Integer tempJustificationFlag; - Standard_Real tempExtensionValue; + Standard_Real tempExtensionValue = 0.; //Standard_Boolean st; //szv#4:S4163:12Mar99 not needed //szv#4:S4163:12Mar99 `st=` not needed diff --git a/src/IGESData/IGESData_ParamReader.cxx b/src/IGESData/IGESData_ParamReader.cxx index 32a6b54ab6..fe060ff5e9 100755 --- a/src/IGESData/IGESData_ParamReader.cxx +++ b/src/IGESData/IGESData_ParamReader.cxx @@ -559,7 +559,7 @@ Standard_Boolean IGESData_ParamReader::ReadXY (const IGESData_ParamCursor& PC,Message_Msg& /*amsg*/, gp_XY& val) { if (!PrepareRead(PC,Standard_False,2)) return Standard_False; - Standard_Real X,Y; + Standard_Real X,Y = 0.; Standard_Boolean stat = (ReadingReal (theindex ,X) && ReadingReal (theindex+1,Y) ); @@ -577,7 +577,7 @@ Standard_Boolean IGESData_ParamReader::ReadXY (const IGESData_ParamCursor& PC, const Standard_CString mess, gp_XY& val) { if (!PrepareRead(PC,mess,Standard_False,2)) return Standard_False; - Standard_Real X,Y; + Standard_Real X,Y = 0.; Standard_Boolean stat = (ReadingReal (theindex ,mess,X) && ReadingReal (theindex+1,mess,Y) ); @@ -597,7 +597,7 @@ Standard_Boolean IGESData_ParamReader::ReadXYZ (const IGESData_ParamCursor& PC,Message_Msg& /*amsg*/, gp_XYZ& val) { if (!PrepareRead(PC,Standard_False,3)) return Standard_False; - Standard_Real X,Y,Z; + Standard_Real X,Y = 0.,Z = 0.; Standard_Boolean stat = (ReadingReal (theindex ,X) && ReadingReal (theindex+1,Y) && @@ -616,7 +616,7 @@ Standard_Boolean IGESData_ParamReader::ReadXYZ (const IGESData_ParamCursor& PC, const Standard_CString mess, gp_XYZ& val) { if (!PrepareRead(PC,mess,Standard_False,3)) return Standard_False; - Standard_Real X,Y,Z; + Standard_Real X,Y = 0.,Z = 0.; Standard_Boolean stat = (ReadingReal (theindex ,mess,X) && ReadingReal (theindex+1,mess,Y) && diff --git a/src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx b/src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx index ffcb43bf23..355db37f16 100755 --- a/src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx @@ -65,7 +65,7 @@ void IGESGeom_ToolBSplineSurface::ReadOwnParams Standard_Integer I, J; Standard_Integer anIndexU, anIndexV, aDegU, aDegV; Standard_Boolean aCloseU, aCloseV, aPolynom, aPeriodU, aPeriodV; - Standard_Real aUmin, aUmax, aVmin, aVmax; + Standard_Real aUmin, aUmax, aVmin = 0., aVmax = 0.; Standard_Real tempVal; gp_XYZ tempXYZ; Handle(TColStd_HArray1OfReal) allKnotsU; diff --git a/src/IGESGeom/IGESGeom_ToolConicArc.cxx b/src/IGESGeom/IGESGeom_ToolConicArc.cxx index 312a3123be..60756e004e 100755 --- a/src/IGESGeom/IGESGeom_ToolConicArc.cxx +++ b/src/IGESGeom/IGESGeom_ToolConicArc.cxx @@ -60,7 +60,7 @@ void IGESGeom_ToolConicArc::ReadOwnParams(const Handle(IGESGeom_ConicArc)& ent, //====================================== //Standard_Boolean st; //szv#4:S4163:12Mar99 not needed - Standard_Real A, B, C, D, E, F, ZT; + Standard_Real A, B = 0., C = 0., D = 0., E = 0., F = 0., ZT; gp_XY tempStart, tempEnd; /* PR.ReadReal(PR.Current(), Msg81, A); //szv#4:S4163:12Mar99 `st=` not needed diff --git a/src/IGESGeom/IGESGeom_ToolPlane.cxx b/src/IGESGeom/IGESGeom_ToolPlane.cxx index 92bbb43862..2707967aa4 100755 --- a/src/IGESGeom/IGESGeom_ToolPlane.cxx +++ b/src/IGESGeom/IGESGeom_ToolPlane.cxx @@ -55,7 +55,7 @@ void IGESGeom_ToolPlane::ReadOwnParams(const Handle(IGESGeom_Plane)& ent, { // MGE 30/07/98 - Standard_Real A, B, C, D, aSize = 0.; + Standard_Real A, B = 0., C = 0., D = 0., aSize = 0.; Handle(IGESData_IGESEntity) aCurve; gp_XYZ attach (0.,0.,0.); IGESData_Status aStatus; diff --git a/src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx b/src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx index 099e6515ca..76478490ff 100755 --- a/src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx +++ b/src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx @@ -41,8 +41,8 @@ void IGESGraph_ToolUniformRectGrid::ReadOwnParams Standard_Integer weighted; gp_XY gridPoint; gp_XY gridSpacing; - Standard_Integer nbPointsX; - Standard_Integer nbPointsY; + Standard_Integer nbPointsX = 0; + Standard_Integer nbPointsY = 0; // Reading nbPropertyValues(Integer) PR.ReadInteger(PR.Current(), "No. of property values", nbPropertyValues); diff --git a/src/IGESToBRep/IGESToBRep_TopoSurface.cxx b/src/IGESToBRep/IGESToBRep_TopoSurface.cxx index e65114c9b5..fe1b793418 100755 --- a/src/IGESToBRep/IGESToBRep_TopoSurface.cxx +++ b/src/IGESToBRep/IGESToBRep_TopoSurface.cxx @@ -201,7 +201,7 @@ static Standard_Boolean extractCurve3d (const TopoDS_Shape& theEdges, { TopExp_Explorer anExp(theEdges, TopAbs_EDGE); Standard_Integer howMuch = 0; - Standard_Real f, l; + Standard_Real f = 0., l = 0.; for (; anExp.More(); anExp.Next()) { TopoDS_Edge anEdge = TopoDS::Edge(anExp.Current()); if (anEdge.IsNull()) diff --git a/src/Image/Image_Diff.cxx b/src/Image/Image_Diff.cxx index f9249ee876..bcedb7bd4f 100644 --- a/src/Image/Image_Diff.cxx +++ b/src/Image/Image_Diff.cxx @@ -412,7 +412,7 @@ Standard_Integer Image_Diff::ignoreBorderEffect() // Find a different area (a set of close to each other pixels which colors differ in both images). // It filters alone pixels with different color. - Standard_Size aRow1, aCol1, aRow2, aCol2; + Standard_Size aRow1 = 0, aCol1 = 0, aRow2, aCol2; Standard_Integer aLen1 = (myDiffPixels.Length() > 0) ? (myDiffPixels.Length() - 1) : 0; for (Standard_Integer aPixelId1 = 0; aPixelId1 < aLen1; ++aPixelId1) { diff --git a/src/IntCurve/IntCurve_IntConicConic_1.cxx b/src/IntCurve/IntCurve_IntConicConic_1.cxx index 6432d0439d..2455dac358 100755 --- a/src/IntCurve/IntCurve_IntConicConic_1.cxx +++ b/src/IntCurve/IntCurve_IntConicConic_1.cxx @@ -1548,7 +1548,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L1 //-- Standard_Integer ResHasFirstPoint=0; Standard_Integer ResHasLastPoint=0; - Standard_Real ParamStart,ParamStart2,ParamEnd,ParamEnd2; + Standard_Real ParamStart = 0.,ParamStart2,ParamEnd = 0.,ParamEnd2; Standard_Real Org2SurL1=ElCLib::Parameter(L1,L2.Location()); //== 3 : L1 et L2 bornent //== 2 : L2 borne diff --git a/src/IntCurveSurface/IntCurveSurface_Inter.gxx b/src/IntCurveSurface/IntCurveSurface_Inter.gxx index ba48975a1a..9f729fa665 100755 --- a/src/IntCurveSurface/IntCurveSurface_Inter.gxx +++ b/src/IntCurveSurface/IntCurveSurface_Inter.gxx @@ -1483,7 +1483,7 @@ void SectionPointToParameters(const Intf_SectionPoint& Sp, gp_Pnt P(Sp.Pnt()); Standard_Integer Pt1,Pt2,Pt3; - Standard_Real u1,v1,param; + Standard_Real u1 = 0.,v1 = 0.,param; //---------------------------------------------------------------------- //-- Calcul des parametres approches sur la surface -- //---------------------------------------------------------------------- diff --git a/src/IntCurveSurface/IntCurveSurface_Polyhedron.gxx b/src/IntCurveSurface/IntCurveSurface_Polyhedron.gxx index 59168580b6..802fa38d23 100755 --- a/src/IntCurveSurface/IntCurveSurface_Polyhedron.gxx +++ b/src/IntCurveSurface/IntCurveSurface_Polyhedron.gxx @@ -445,11 +445,7 @@ Standard_Integer IntCurveSurface_Polyhedron::TriConnex Standard_Integer colP = Pivotm1 - ligP * nbdeltaVp1; // Point sur Edge position in the MaTriangle and edge typ : -#ifndef DEB Standard_Integer ligE =0, colE =0, typE =0; -#else - Standard_Integer ligE, colE, typE; -#endif if (Pedge!=0) { ligE= (Pedge-1)/nbdeltaVp1; colE= (Pedge-1) - (ligE * nbdeltaVp1); @@ -465,15 +461,11 @@ Standard_Integer IntCurveSurface_Polyhedron::TriConnex } // Triangle position General case : -#ifndef DEB + Standard_Integer linT =0, colT =0; Standard_Integer linO =0, colO =0; Standard_Integer t =0, tt =0; -#else - Standard_Integer linT, colT; - Standard_Integer linO, colO; - Standard_Integer t,tt; -#endif + if (Triang!=0) { t = (Triang-1)/(nbdeltaVm2); tt= (Triang-1)-t*nbdeltaVm2; diff --git a/src/IntPatch/IntPatch_ALineToWLine.cxx b/src/IntPatch/IntPatch_ALineToWLine.cxx index 6d2f87951a..39004b69ca 100755 --- a/src/IntPatch/IntPatch_ALineToWLine.cxx +++ b/src/IntPatch/IntPatch_ALineToWLine.cxx @@ -305,7 +305,7 @@ static LinOn2S = new IntSurf_LineOn2S; //// Modified by jgv, 17.09.09 for OCC21255 //// - Standard_Real refpar = RealLast(), ref_u1, ref_u2; + Standard_Real refpar = RealLast(), ref_u1 = 0., ref_u2 = 0.; if (nbvtx) { const IntPatch_Point& FirstVertex = aline->Vertex(1); @@ -1092,8 +1092,8 @@ void RefineParameters(const Handle(IntPatch_ALine)& aALine, } // Standard_Boolean bIsDone, bIsEmpty, bParallel, bFound; - Standard_Integer aNbPoints; - Standard_Real aHalfPi, aEpsilon, aLimV, dT, aT1, aT2, aEpsT; + Standard_Integer aNbPoints = 0; + Standard_Real aHalfPi, aEpsilon, aLimV, dT, aT1, aT2 = 0., aEpsT; Standard_Real aU1, aV1, aU2, aV2; gp_Pnt aP1, aP2, aPx; gp_Pnt2d aP2D1, aP2D2, aPLim(0., 0.); diff --git a/src/IntPatch/IntPatch_ImpImpIntersection_0.gxx b/src/IntPatch/IntPatch_ImpImpIntersection_0.gxx index ac53243948..9b099ba06c 100755 --- a/src/IntPatch/IntPatch_ImpImpIntersection_0.gxx +++ b/src/IntPatch/IntPatch_ImpImpIntersection_0.gxx @@ -109,11 +109,9 @@ Standard_Boolean IntersectionWithAnArc(gp_Pnt& PSurf, dtheta = (u1alin-u0alin)*0.01; Standard_Real du=0.000000001; Standard_Real distmin = RealLast(); -#ifndef DEB + Standard_Real thetamin = 0.; -#else - Standard_Real thetamin; -#endif + Standard_Real theparameteronarc = _theparameteronarc; for(Standard_Real _theta=u0alin+dtheta; _theta<=u1alin-dtheta; _theta+=dtheta) { gp_Pnt P=alin->Value(_theta); @@ -123,11 +121,9 @@ Standard_Boolean IntersectionWithAnArc(gp_Pnt& PSurf, distmin=d; } } -#ifndef DEB + Standard_Real bestpara =0., besttheta =0., bestdist =0., distinit =0. ; -#else - Standard_Real bestpara,besttheta,bestdist,distinit; -#endif + //-- Distance initiale { gp_Pnt pp0 = alin->Value(thetamin); @@ -1232,7 +1228,7 @@ Standard_Boolean SingleLine (const gp_Pnt& Psurf, IntPatch_IType typarc = lin->ArcType(); - Standard_Real parproj; + Standard_Real parproj = 0.; gp_Vec tgint; gp_Pnt ptproj; Standard_Boolean retvalue; @@ -1343,11 +1339,9 @@ void ProcessSegments (const IntPatch_SequenceOfSegmentOfTheSOnBounds& listedg, IntPatch_TheSegmentOfTheSOnBounds thesegsol; IntPatch_ThePathPointOfTheSOnBounds PStartf,PStartl; Standard_Boolean dofirst,dolast,procf,procl; -#ifndef DEB + Standard_Real paramf =0.,paraml =0.,U1 =0.,V1 =0.,U2 =0.,V2 =0.; -#else - Standard_Real paramf,paraml,U1,V1,U2,V2; -#endif + IntPatch_IType typ; IntSurf_TypeTrans trans1,trans2; IntSurf_Transition TRest,TArc; @@ -1684,11 +1678,9 @@ void ProcessRLine (IntPatch_SequenceOfLine& slin, Standard_Integer i,j,k; Standard_Integer Nblin,Nbvtx, Nbpt; -#ifndef DEB + Standard_Boolean OnFirst = Standard_False,project = Standard_False,keeppoint = Standard_False; -#else - Standard_Boolean OnFirst,project,keeppoint; -#endif + Handle(Adaptor2d_HCurve2d) arcref; Standard_Real paramproj,paramf,paraml; diff --git a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx index c2a063bf7e..bd39936770 100755 --- a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx @@ -405,7 +405,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur const Standard_Real Pas) { Standard_Boolean reversed, procf, procl, dofirst, dolast; - Standard_Integer indfirst, indlast, ind2, i,j,k, NbSegm; + Standard_Integer indfirst = 0, indlast = 0, ind2, i,j,k, NbSegm; Standard_Integer NbPointIns, NbPointRst, Nblines, Nbpts, NbPointDep; Standard_Real U1,V1,U2,V2,paramf,paraml,currentparam; diff --git a/src/IntPatch/IntPatch_RstInt.cxx b/src/IntPatch/IntPatch_RstInt.cxx index 18d1e4c3db..ae33cf20b5 100755 --- a/src/IntPatch/IntPatch_RstInt.cxx +++ b/src/IntPatch/IntPatch_RstInt.cxx @@ -460,7 +460,7 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L, IntPatch_SearchPnt Commun; Standard_Real U,V,W; - Standard_Real U1,V1,U2,V2; + Standard_Real U1,V1,U2 = 0.,V2 = 0.; Standard_Real paramarc=0.,paramline=0.; Standard_Integer i,j,k; TColgp_SequenceOfPnt locpt; diff --git a/src/IntStart/IntStart_SearchOnBoundaries_1.gxx b/src/IntStart/IntStart_SearchOnBoundaries_1.gxx index aa5b9e3216..c99c74640b 100755 --- a/src/IntStart/IntStart_SearchOnBoundaries_1.gxx +++ b/src/IntStart/IntStart_SearchOnBoundaries_1.gxx @@ -147,7 +147,7 @@ void BoundedArc (const TheArc& A, Standard_Integer i,Nbi,Nbp; gp_Pnt ptdeb,ptfin; - Standard_Real pardeb,parfin; + Standard_Real pardeb = 0,parfin = 0; Standard_Integer ideb,ifin,range,ranged,rangef; @@ -593,7 +593,7 @@ void InfiniteArc (const TheArc& A, Standard_Integer i,Nbi,Nbp; gp_Pnt ptdeb,ptfin; - Standard_Real pardeb,parfin; + Standard_Real pardeb = 0.,parfin = 0.; Standard_Integer ideb,ifin,range,ranged,rangef; diff --git a/src/IntTools/IntTools_BeanFaceIntersector.cxx b/src/IntTools/IntTools_BeanFaceIntersector.cxx index 975e5e077f..1e92ff5e6f 100755 --- a/src/IntTools/IntTools_BeanFaceIntersector.cxx +++ b/src/IntTools/IntTools_BeanFaceIntersector.cxx @@ -908,7 +908,7 @@ Standard_Integer IntTools_BeanFaceIntersector::FastComputeExactIntersection() } // if(aAng2<=aTolang2) {// IsParallel = Standard_True; - Standard_Boolean bFlag; + Standard_Boolean bFlag = Standard_False; Standard_Integer i; Standard_Real aD; gp_Pnt aPL[2]; diff --git a/src/IntTools/IntTools_EdgeEdge_1.cxx b/src/IntTools/IntTools_EdgeEdge_1.cxx index d184d4f498..77aa02dcb5 100644 --- a/src/IntTools/IntTools_EdgeEdge_1.cxx +++ b/src/IntTools/IntTools_EdgeEdge_1.cxx @@ -518,7 +518,7 @@ Standard_Boolean IntTools_ComparatorCurve::IsSameXYZ(const gp_XYZ& aXYZ1, const gp_XYZ& aXYZ2) { - Standard_Boolean bRet; + Standard_Boolean bRet = Standard_False; Standard_Integer i; Standard_Real aX1[3], aX2[3]; diff --git a/src/IntTools/IntTools_EdgeFace.cxx b/src/IntTools/IntTools_EdgeFace.cxx index 649fec29dd..1402429b3a 100755 --- a/src/IntTools/IntTools_EdgeFace.cxx +++ b/src/IntTools/IntTools_EdgeFace.cxx @@ -427,7 +427,7 @@ void IntTools_EdgeFace::CheckData() myC.D0(t, P); GeomAPI_ProjectPointOnSurf aProjector; // - Standard_Real ULD, VLD; + Standard_Real ULD = 0., VLD = 0.; GeomAPI_ProjectPointOnSurf& aLocProj = myContext->ProjPS(myFace); aLocProj.Perform(P); diff --git a/src/IntWalk/IntWalk_IWalking_4.gxx b/src/IntWalk/IntWalk_IWalking_4.gxx index a87fd9a8e5..849ce9080f 100755 --- a/src/IntWalk/IntWalk_IWalking_4.gxx +++ b/src/IntWalk/IntWalk_IWalking_4.gxx @@ -47,7 +47,7 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult, // ******************************************************************** { - Standard_Integer I,N; + Standard_Integer I,N = 0; Standard_Real aBornInf[2], aBornSup[2], aUVap[2]; math_Vector BornInf(aBornInf,1,2), BornSup(aBornSup,1,2); math_Vector Uvap(aUVap,1,2);// parameters of current approach diff --git a/src/IntWalk/IntWalk_PWalking_4.gxx b/src/IntWalk/IntWalk_PWalking_4.gxx index 26c35e15ac..69dacc3579 100755 --- a/src/IntWalk/IntWalk_PWalking_4.gxx +++ b/src/IntWalk/IntWalk_PWalking_4.gxx @@ -47,11 +47,7 @@ Standard_Boolean IntWalk_PWalking:: { Standard_Real Uvd[4],Uvf[4],Epsuv[4],Duv[4],Uvp[4],dv,dv2,ParC[4]; Standard_Real DPc,DPb; -#ifndef DEB Standard_Integer i = 0, k = 0; -#else - Standard_Integer i,k; -#endif Epsuv[0] = ResoU1; Epsuv[1] = ResoV1; Epsuv[2] = ResoU2; diff --git a/src/Interface/Interface_FloatWriter.cxx b/src/Interface/Interface_FloatWriter.cxx index afba0c0bcf..6d57b9b2d6 100755 --- a/src/Interface/Interface_FloatWriter.cxx +++ b/src/Interface/Interface_FloatWriter.cxx @@ -104,7 +104,7 @@ Standard_Integer Interface_FloatWriter::Convert (const Standard_Real val, // Valeur flottante, expurgee de "0000" qui trainent et de "E+00" const Standard_Integer anMasSize = 5; // change 6 to 5: index 5 is not used below char lxp[anMasSize], *pText; - int i0, j0 = 0; + int i0 = 0, j0 = 0; for (Standard_Integer i = 0; i < anMasSize; ++i) lxp[i] = '\0'; diff --git a/src/LDOM/LDOM_XmlReader.cxx b/src/LDOM/LDOM_XmlReader.cxx index 5a274aa2aa..9f0c024556 100755 --- a/src/LDOM/LDOM_XmlReader.cxx +++ b/src/LDOM/LDOM_XmlReader.cxx @@ -112,7 +112,7 @@ LDOM_XmlReader::RecordType LDOM_XmlReader::ReadRecord theData.Clear(); myError.Clear(); ParserState aState = STATE_WAITING; - const char * aStartData = NULL, * aNameEnd, * aPtr; + const char * aStartData = NULL, * aNameEnd = NULL, * aPtr; LDOMBasicString anAttrName, anAttrValue; char anAttDelimiter = '\0'; diff --git a/src/Law/Law_BSpFunc.cxx b/src/Law/Law_BSpFunc.cxx index f97f10f3be..aac0935bd7 100755 --- a/src/Law/Law_BSpFunc.cxx +++ b/src/Law/Law_BSpFunc.cxx @@ -202,7 +202,7 @@ void Law_BSpFunc::Intervals(TColStd_Array1OfReal& T, Standard_Real Law_BSpFunc::Value(const Standard_Real X) { if ((X==first) || (X==last)) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (X==first) { curv->LocateU(first, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; @@ -231,7 +231,7 @@ void Law_BSpFunc::D1(const Standard_Real X, Standard_Real& D) { if ((X==first) || (X==last)) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (X==first) { curv->LocateU(first, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; @@ -260,7 +260,7 @@ void Law_BSpFunc::D2(const Standard_Real X, Standard_Real& D2) { if ((X==first) || (X==last)) { - Standard_Integer Ideb, Ifin; + Standard_Integer Ideb = 0, Ifin = 0; if (X==first) { curv->LocateU(first, PosTol, Ideb, Ifin); if (Ideb<1) Ideb=1; diff --git a/src/LocOpe/LocOpe_BuildShape.cxx b/src/LocOpe/LocOpe_BuildShape.cxx index 5c043a493d..c51b356574 100755 --- a/src/LocOpe/LocOpe_BuildShape.cxx +++ b/src/LocOpe/LocOpe_BuildShape.cxx @@ -354,11 +354,9 @@ static void Propagate(const TopoDS_Shape& F, for (exp.Init(F,TopAbs_EDGE); exp.More(); exp.Next()) { // for (TopExp_Explorer exp(F,TopAbs_EDGE); exp.More(); exp.Next()) { const TopoDS_Shape& edg = exp.Current(); -#ifdef DEB - TopAbs_Orientation ored1 = edg.Orientation(),ored2; -#else + TopAbs_Orientation ored1 = edg.Orientation(),ored2 = TopAbs_FORWARD; -#endif + if (ored1 == TopAbs_INTERNAL || ored1 == TopAbs_EXTERNAL) { continue; } diff --git a/src/LocOpe/LocOpe_CSIntersector.cxx b/src/LocOpe/LocOpe_CSIntersector.cxx index 4c2c8b0120..42fc64521d 100755 --- a/src/LocOpe/LocOpe_CSIntersector.cxx +++ b/src/LocOpe/LocOpe_CSIntersector.cxx @@ -543,11 +543,9 @@ static void AddPoints(IntCurvesFace_Intersector& theInt, param = theInt.WParameter(j); paramu = theInt.UParameter(j); paramv = theInt.VParameter(j); -#ifdef DEB - TopAbs_Orientation theor; -#else + TopAbs_Orientation theor=TopAbs_FORWARD; -#endif + switch (theInt.Transition(j)) { case IntCurveSurface_In: /* JAG 13.09.96 diff --git a/src/LocOpe/LocOpe_CurveShapeIntersector.cxx b/src/LocOpe/LocOpe_CurveShapeIntersector.cxx index a844cbebe2..ad97f715a2 100755 --- a/src/LocOpe/LocOpe_CurveShapeIntersector.cxx +++ b/src/LocOpe/LocOpe_CurveShapeIntersector.cxx @@ -345,11 +345,8 @@ static void Perform(BRepIntCurveSurface_Inter & theInt, { Standard_Real param,paramu,paramv; Standard_Integer i, nbpoints=0; -#ifdef DEB - TopAbs_Orientation theor, orface; -#else + TopAbs_Orientation theor=TopAbs_FORWARD, orface; -#endif while (theInt.More()) { const gp_Pnt& thept = theInt.Pnt(); diff --git a/src/LocOpe/LocOpe_Generator.cxx b/src/LocOpe/LocOpe_Generator.cxx index e99c9f218e..7c04a534ea 100755 --- a/src/LocOpe/LocOpe_Generator.cxx +++ b/src/LocOpe/LocOpe_Generator.cxx @@ -388,7 +388,7 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G) TopoDS_Edge newedg; TopoDS_Vertex newvtx; TopLoc_Location loc; - Standard_Real tol,prm,f,l, Uminc,Umaxc;; + Standard_Real tol,prm,f,l, Uminc = 0.,Umaxc = 0.; gp_Pnt2d pf,pl; Handle(Geom_Surface) S; diff --git a/src/LocOpe/LocOpe_SplitDrafts.cxx b/src/LocOpe/LocOpe_SplitDrafts.cxx index a3758818d9..aa77905838 100755 --- a/src/LocOpe/LocOpe_SplitDrafts.cxx +++ b/src/LocOpe/LocOpe_SplitDrafts.cxx @@ -156,11 +156,8 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F, Standard_ConstructionError::Raise(); } -#ifdef DEB - TopAbs_Orientation OriF; -#else TopAbs_Orientation OriF = TopAbs_FORWARD; -#endif + Standard_Boolean FinS = Standard_False; TopExp_Explorer exp,exp2; for (exp.Init(myShape,TopAbs_FACE); exp.More(); exp.Next()) { @@ -1493,11 +1490,9 @@ static void MakeFace(TopoDS_Face& F, Standard_Boolean wdone = (ledg.IsEmpty() || VFirst.IsSame(VLast)); while (!wdone) { TopoDS_Vertex VF,VL; -#ifdef DEB - TopAbs_Orientation oredg; -#else + TopAbs_Orientation oredg = TopAbs_FORWARD; -#endif + for (itl.Initialize(ledg); itl.More(); itl.Next()) { const TopoDS_Edge& edg2 = TopoDS::Edge(itl.Value()); TopoDS_Shape aLocalShape = edg2.Oriented(TopAbs_FORWARD); diff --git a/src/LocOpe/LocOpe_SplitShape.cxx b/src/LocOpe/LocOpe_SplitShape.cxx index 87cfbbbf2d..611fd58ef6 100755 --- a/src/LocOpe/LocOpe_SplitShape.cxx +++ b/src/LocOpe/LocOpe_SplitShape.cxx @@ -951,11 +951,9 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W, newF2.Orientation(TopAbs_FORWARD); // modifs JAG 97.05.28 -#ifdef DEB - TopAbs_Orientation orfila; -#else + TopAbs_Orientation orfila=TopAbs_FORWARD; -#endif + for (exp.Init(FaceRef.Oriented(TopAbs_FORWARD),TopAbs_WIRE); exp.More(); exp.Next()) { const TopoDS_Wire& wir = TopoDS::Wire(exp.Current()); @@ -1493,7 +1491,7 @@ static TopoDS_Shape ChooseDirection(const TopoDS_Shape& RefDir, TopExp_Explorer Explo(RefDir, TopAbs_EDGE); TopoDS_Edge RefEdge; TopoDS_Vertex V1, V2; - TopAbs_Orientation anOr; + TopAbs_Orientation anOr = TopAbs_FORWARD; for (; Explo.More(); Explo.Next()) { RefEdge = TopoDS::Edge(Explo.Current()); diff --git a/src/MAT2d/MAT2d_Tool2d.cxx b/src/MAT2d/MAT2d_Tool2d.cxx index fb9e735b07..927eb21b36 100755 --- a/src/MAT2d/MAT2d_Tool2d.cxx +++ b/src/MAT2d/MAT2d_Tool2d.cxx @@ -666,7 +666,7 @@ Standard_Real MAT2d_Tool2d::IntersectBisector ( Standard_Real Tolerance = MAT2d_TOLCONF; Standard_Real Param1,Param2; Standard_Real Parama,Paramb; - Standard_Real Distance,DistanceMini; + Standard_Real Distance = 0.,DistanceMini; Standard_Boolean SolutionValide; gp_Pnt2d PointSolution; diff --git a/src/MeshVS/MeshVS_MeshPrsBuilder.cxx b/src/MeshVS/MeshVS_MeshPrsBuilder.cxx index dce4b8932f..0088485875 100755 --- a/src/MeshVS/MeshVS_MeshPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_MeshPrsBuilder.cxx @@ -585,7 +585,7 @@ void MeshVS_MeshPrsBuilder::AddFaceWirePrs (const TColStd_Array1OfReal& theCoord const Standard_Boolean IsShrinked, const Standard_Real ShrinkCoef) const { - Standard_Real xG, yG, zG, X, Y, Z, startX=0., startY=0., startZ=0.; + Standard_Real xG = 0., yG = 0., zG = 0., X, Y, Z, startX=0., startY=0., startZ=0.; theLines->AddBound ( NbNodes+1 ); if ( IsShrinked ) CalculateCenter( theCoords, NbNodes, xG, yG, zG ); @@ -628,7 +628,7 @@ void MeshVS_MeshPrsBuilder::AddFaceSolidPrs (const Standard_Integer ID, if ( aDS.IsNull() ) return; - Standard_Real xG, yG, zG, X, Y, Z, nx, ny, nz; + Standard_Real xG = 0., yG = 0., zG = 0., X, Y, Z, nx = 0., ny = 0., nz = 0.; thePolygons->AddBound ( NbNodes ); if ( IsShrinked ) CalculateCenter( theCoords, NbNodes, xG, yG, zG ); diff --git a/src/NIS/NIS_View.cxx b/src/NIS/NIS_View.cxx index 37119241cb..37a24aa658 100755 --- a/src/NIS/NIS_View.cxx +++ b/src/NIS/NIS_View.cxx @@ -129,7 +129,7 @@ Standard_Boolean NIS_View::FitAll3d (const Quantity_Coefficient theCoef) // Check that the box is not empty if (aBox.IsVoid() == Standard_False && MyView->IsDefined() == Standard_True) { // Convert the 3D box to 2D representation in view coordinates - Standard_Real Umin,Umax,Vmin,Vmax,U,V,W; + Standard_Real Umin = 0.,Umax = 0.,Vmin = 0.,Vmax = 0.,U,V,W; gp_XYZ aCoord; const gp_XYZ aCorner[2] = { aBox.CornerMin(), aBox.CornerMax() }; diff --git a/src/OpenGl/OpenGl_GraduatedTrihedron.cxx b/src/OpenGl/OpenGl_GraduatedTrihedron.cxx index de72c8c74e..41b8a94a66 100644 --- a/src/OpenGl/OpenGl_GraduatedTrihedron.cxx +++ b/src/OpenGl/OpenGl_GraduatedTrihedron.cxx @@ -330,9 +330,9 @@ void OpenGl_GraduatedTrihedron::Render (const Handle(OpenGl_Workspace)& theWorks float LX1[6], LX2[6], LX3[6]; /* Lines along X direction */ float LY1[6], LY2[6], LY3[6]; /* Lines along Y direction */ float LZ1[6], LZ2[6], LZ3[6]; /* Lines along Z direction */ - unsigned char LX1draw, LX2draw, LX3draw; /* Allows drawing of X-line (000 - 100 is forbidden) */ - unsigned char LY1draw, LY2draw, LY3draw; /* Allows drawing of Y-line (000 - 010 is forbidden) */ - unsigned char LZ1draw, LZ2draw, LZ3draw; /* Allows drawing of Z-line (000 - 001 is forbidden) */ + unsigned char LX1draw = 0, LX2draw = 0, LX3draw = 0; /* Allows drawing of X-line (000 - 100 is forbidden) */ + unsigned char LY1draw = 0, LY2draw = 0, LY3draw = 0; /* Allows drawing of Y-line (000 - 010 is forbidden) */ + unsigned char LZ1draw = 0, LZ2draw = 0, LZ3draw = 0; /* Allows drawing of Z-line (000 - 001 is forbidden) */ /* The first axis will be used for drawing the text and the values. */ switch (farestCorner) diff --git a/src/OpenGl/OpenGl_View_2.cxx b/src/OpenGl/OpenGl_View_2.cxx index 2e2b5f66e5..a9faf4627f 100644 --- a/src/OpenGl/OpenGl_View_2.cxx +++ b/src/OpenGl/OpenGl_View_2.cxx @@ -68,7 +68,7 @@ static void bind_light(const OpenGl_Light *lptr, int *gl_lid) if (*gl_lid > GL_LIGHT7) return; // the light is a headlight ? - GLint cur_matrix; + GLint cur_matrix = 0; if (lptr->HeadLight) { glGetIntegerv(GL_MATRIX_MODE, &cur_matrix); diff --git a/src/Primitives/Primitives_Wedge.gxx b/src/Primitives/Primitives_Wedge.gxx index bdaa52e749..bb67ed27cc 100755 --- a/src/Primitives/Primitives_Wedge.gxx +++ b/src/Primitives/Primitives_Wedge.gxx @@ -362,11 +362,7 @@ gp_Pln Primitives_Wedge::Plane(const Primitives_Direction d1) break; }; -#ifndef DEB - Standard_Real X =0., Y =0., Z =0.; -#else - Standard_Real X, Y, Z; -#endif + Standard_Real X = 0., Y = 0., Z = 0.; switch (i) { @@ -444,12 +440,10 @@ const TheFace& Primitives_Wedge::Face if ( i%2 == 0 ) myBuilder.ReverseFace(myFaces[i]); // pcurves -#ifndef DEB + Primitives_Direction dd1 = Primitives_ZMin, dd2 = Primitives_YMax, dd3 = Primitives_ZMax,dd4 = Primitives_YMin; -#else - Primitives_Direction dd1,dd2,dd3,dd4; -#endif + switch (i/2) { case 0 : @@ -540,11 +534,8 @@ Standard_Boolean Primitives_Wedge::HasWire (const Primitives_Direction d1) const Standard_Integer i = Primitives_Wedge_NumDir1(d1); if (myInfinite[i]) return Standard_False; -#ifndef DEB Primitives_Direction dd1 = Primitives_XMin,dd2 = Primitives_YMax,dd3 = Primitives_XMax ,dd4 = Primitives_ZMin; -#else - Primitives_Direction dd1,dd2,dd3,dd4; -#endif + switch (i/2) { case 0 : @@ -590,11 +581,8 @@ const TheWire& Primitives_Wedge::Wire { Standard_Integer i = Primitives_Wedge_NumDir1(d1); -#ifndef DEB Primitives_Direction dd1 = Primitives_XMin,dd2 = Primitives_YMax,dd3 = Primitives_XMax ,dd4 = Primitives_ZMin; -#else - Primitives_Direction dd1,dd2,dd3,dd4; -#endif + if (!WiresBuilt[i]) { switch (i/2) { @@ -675,11 +663,9 @@ gp_Lin Primitives_Wedge::Line if (!HasEdge(d1,d2)) Standard_DomainError::Raise(); Standard_Integer i = Primitives_Wedge_NumDir2(d1,d2); -#ifndef DEB + Standard_Real X =0., Y =0., Z =0.; -#else - Standard_Real X, Y, Z; -#endif + gp_Dir D; gp_Vec VX = myAxes.XDirection(); gp_Vec VY = myAxes.YDirection(); @@ -827,11 +813,9 @@ const TheEdge& Primitives_Wedge::Edge Standard_Integer i = Primitives_Wedge_NumDir2(d1,d2); if (!EdgesBuilt[i]) { -#ifndef DEB + Primitives_Direction dd1 = Primitives_XMin ,dd2 = Primitives_XMax; -#else - Primitives_Direction dd1,dd2; -#endif + switch (i/4) { case 0 : @@ -923,11 +907,9 @@ gp_Pnt Primitives_Wedge::Point if (!HasVertex(d1,d2,d3)) Standard_DomainError::Raise(); Standard_Integer i = Primitives_Wedge_NumDir3(d1,d2,d3); -#ifndef DEB + Standard_Real X =0., Y =0., Z =0.; -#else - Standard_Real X, Y, Z; -#endif + switch (i) { case 0 : diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.cxx b/src/ProjLib/ProjLib_CompProjectedCurve.cxx index 5d32f2514a..132068f5e5 100755 --- a/src/ProjLib/ProjLib_CompProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.cxx @@ -612,7 +612,7 @@ static Standard_Boolean InitialPoint(const gp_Pnt& Point, prevDeb=t; if (t == LastU) FromLastU=Standard_True; Standard_Boolean initpoint=Standard_False; - Standard_Real U, V; + Standard_Real U = 0., V = 0.; gp_Pnt CPoint; Standard_Real ParT,ParU,ParV; diff --git a/src/ProjLib/ProjLib_ComputeApprox.cxx b/src/ProjLib/ProjLib_ComputeApprox.cxx index 2c4a504694..e50adb312e 100755 --- a/src/ProjLib/ProjLib_ComputeApprox.cxx +++ b/src/ProjLib/ProjLib_ComputeApprox.cxx @@ -91,7 +91,7 @@ static gp_Pnt2d Function_Value(const Standard_Real U, const Standard_Boolean UCouture, const Standard_Boolean VCouture ) { - Standard_Real S, T; + Standard_Real S = 0., T = 0.; gp_Pnt P3d = myCurve->Value(U); GeomAbs_SurfaceType SType = mySurface->GetType(); @@ -1072,7 +1072,7 @@ ProjLib_ComputeApprox::ProjLib_ComputeApprox //Return curve home Standard_Real UFirst = F.FirstParameter(); gp_Pnt P3d = C->Value( UFirst ); - Standard_Real u, v; + Standard_Real u = 0., v = 0.; switch (SType) { case GeomAbs_Plane: diff --git a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx index 8fde532a9b..e9df2b509f 100755 --- a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx +++ b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx @@ -119,7 +119,7 @@ static gp_Pnt2d Function_Value(const Standard_Real U, if((Type != GeomAbs_BSplineSurface) && (Type != GeomAbs_BezierSurface) && (Type != GeomAbs_OffsetSurface) ) { - Standard_Real S, T; + Standard_Real S = 0., T = 0.; switch (Type) { // case GeomAbs_Plane: // { diff --git a/src/ProjLib/ProjLib_ProjectedCurve.cxx b/src/ProjLib/ProjLib_ProjectedCurve.cxx index 97d9c0fa47..2f5911a9a0 100755 --- a/src/ProjLib/ProjLib_ProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_ProjectedCurve.cxx @@ -468,7 +468,7 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C) { Standard_Boolean IsTrimmed[2] = {Standard_False, Standard_False}; Standard_Real Vsingular[2]; //for surfaces of revolution - Standard_Real f, l, dt; + Standard_Real f = 0., l = 0., dt = 0.; const Standard_Real eps = 0.01; if(mySurface->GetType() == GeomAbs_SurfaceOfRevolution) { @@ -512,7 +512,7 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C) // doit etre une et une seule courbe !!! // De plus, cette courbe ne doit pas etre Single point Standard_Integer NbCurves = Projector.NbCurves(); - Standard_Real Udeb,Ufin; + Standard_Real Udeb = 0.,Ufin = 0.; if (NbCurves > 0) { Projector.Bounds(1,Udeb,Ufin); } diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index 231ec0b9a4..d0aebf4a5d 100755 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -254,7 +254,7 @@ static int BUC60610(Draw_Interpretor& di, Standard_Integer argc, const char ** a printf("Usage: %s iges_input [name]\n",argv[0]); return(1); } - Standard_Character *Ch; + Standard_Character *Ch = NULL; if(argc > 2) { Ch = new Standard_Character[strlen(argv[2])+3]; diff --git a/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx b/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx index ebf10571af..55a0f3ca93 100755 --- a/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx +++ b/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx @@ -620,7 +620,7 @@ static void Sort3Faces(const TopTools_ListOfShape& theListIn, TopTools_ListOfSha } Standard_Boolean found = Standard_False; - Standard_Integer j, i1, i2, i3; + Standard_Integer j, i1 = 0, i2 = 0, i3 = 0; TopoDS_Edge anEdge; for(i=1;i<=3;i++) { TopExp_Explorer anExp1(ArS.Value(i), TopAbs_EDGE); @@ -840,7 +840,7 @@ static void SortEdges2(const TColgp_Array1OfPnt& theArP, const gp_Ax1& theAx, static void SortEdges3(const TopTools_Array1OfShape& theArS, const TColgp_Array1OfPnt& theArP, const gp_Ax1& theAx, TColStd_Array1OfInteger& theArI) { - Standard_Integer i, j, i1,i2, i3; + Standard_Integer i, j, i1 = 0,i2 = 0, i3 = 0; TopoDS_Shape aV; Standard_Boolean adjacent = Standard_False; for(i=1;i<=3;i++) { @@ -910,13 +910,13 @@ static void SortEdges4(const TopTools_Array1OfShape& theArS, const TColgp_Array1 // 2. find nearest pair, reorganize ArI // 3. sort inside pairs // ======================================= - Standard_Integer i, j, i1,i2, i3, i4; + Standard_Integer i, j, i1 = 0,i2 = 0, i3 = 0, i4 = 0; // 1. TopoDS_Shape aV1; for(i=1;i<=4;i++) { const TopoDS_Shape& aV11 = TopExp::FirstVertex(TopoDS::Edge(theArS.Value(i))); const TopoDS_Shape& aV12 = TopExp::LastVertex(TopoDS::Edge(theArS.Value(i))); - Standard_Boolean aDjacent; + Standard_Boolean aDjacent = Standard_False; for(j=1;j<=4;j++) { if(i==j) continue; const TopoDS_Shape& aV21 = TopExp::FirstVertex(TopoDS::Edge(theArS.Value(j))); @@ -1166,7 +1166,7 @@ static void FindAdjacent3(const TopTools_ListOfShape& theList, ArD.SetValue(i, anAx.Direction()); } Standard_Boolean aDjacent = Standard_False; - Standard_Integer j, i2, i3; //i2, i3 - indexes of two adjacent faces having the same surface + Standard_Integer j, i2 = 0, i3 = 0; //i2, i3 - indexes of two adjacent faces having the same surface Standard_Integer i1 = 0; //single face for(i=1;i<=3;i++) { for(j=1;j<=3;j++) { diff --git a/src/QANewBRepNaming/QANewBRepNaming_Loader.cxx b/src/QANewBRepNaming/QANewBRepNaming_Loader.cxx index 14f9ea20d3..4b4724db8e 100755 --- a/src/QANewBRepNaming/QANewBRepNaming_Loader.cxx +++ b/src/QANewBRepNaming/QANewBRepNaming_Loader.cxx @@ -120,7 +120,7 @@ void QANewBRepNaming_Loader::LoadModifiedShapes (BRepBuilderAPI_MakeShape& MS TopTools_MapOfShape View; TopExp_Explorer ShapeExplorer (ShapeIn, KindOfShape); TopTools_ListOfShape Shapes; - BRepAlgoAPI_BooleanOperation* pMS; + BRepAlgoAPI_BooleanOperation* pMS = NULL; if (theBool) pMS = (reinterpret_cast(&MS)); for (; ShapeExplorer.More(); ShapeExplorer.Next ()) { diff --git a/src/QANewModTopOpe/QANewModTopOpe.cxx b/src/QANewModTopOpe/QANewModTopOpe.cxx index 9d9bcd4ff1..9614612f2b 100755 --- a/src/QANewModTopOpe/QANewModTopOpe.cxx +++ b/src/QANewModTopOpe/QANewModTopOpe.cxx @@ -254,7 +254,7 @@ static Standard_Boolean CorrectOrientation(const TopoDS_Shell& TheS) Standard_Integer i, nbEdgs = aMapEdgeFace.Extent(); TopExp_Explorer anExp; - TopAbs_Orientation anOrnt; + TopAbs_Orientation anOrnt = TopAbs_FORWARD; for(i = 1; i <= nbEdgs; i++) { diff --git a/src/QANewModTopOpe/QANewModTopOpe_Glue_shell.cxx b/src/QANewModTopOpe/QANewModTopOpe_Glue_shell.cxx index 54bcb61610..b9074d5ab0 100755 --- a/src/QANewModTopOpe/QANewModTopOpe_Glue_shell.cxx +++ b/src/QANewModTopOpe/QANewModTopOpe_Glue_shell.cxx @@ -763,7 +763,7 @@ QANewModTopOpe_Glue::PerformShell() TopoDS_Shape aNewS[2]; Standard_Integer nbModified = 0; Standard_Integer nbDeleted = 0; - Standard_Integer iShape; + Standard_Integer iShape = 0; for (i = 0; i < 2; i++) { const TopoDS_Shape& aOldS = (i==0 ? myS1 : myS2); @@ -1208,7 +1208,7 @@ IsVertexOnFaceBound (const TopoDS_Vertex& theVer, Standard_Real& thePar, Standard_Real& theDist) { - Standard_Real aDist, aPar, aTol2; + Standard_Real aDist, aPar, aTol2 = 0.; theDist = RealLast(); gp_Pnt aPnt(BRep_Tool::Pnt(theVer)); Standard_Boolean isContactByVer = Standard_False; diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnit.cxx index ef25ee582b..3c167a4e52 100755 --- a/src/RWStepBasic/RWStepBasic_RWSiUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnit.cxx @@ -97,7 +97,7 @@ void RWStepBasic_RWSiUnit::ReadStep(const Handle(StepData_StepReaderData)& data, } // --- own field : name --- - StepBasic_SiUnitName aName; + StepBasic_SiUnitName aName = StepBasic_sunMetre; if (data->ParamType(num,3) == Interface_ParamEnum) { Standard_CString text = data->ParamCValue(num,3); if(!DecodeName(aName,text)) diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndAreaUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndAreaUnit.cxx index 76c61b5b37..de3fad68ac 100755 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndAreaUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndAreaUnit.cxx @@ -48,7 +48,7 @@ void RWStepBasic_RWSiUnitAndAreaUnit::ReadStep(const Handle(StepData_StepReaderD if (!data->CheckNbParams(num,2,ach,"si_unit")) return; RWStepBasic_RWSiUnit reader; - StepBasic_SiPrefix aPrefix; + StepBasic_SiPrefix aPrefix = StepBasic_spExa; Standard_Boolean hasAprefix = Standard_False; if (data->IsParamDefined(num,1)) { if (data->ParamType(num,1) == Interface_ParamEnum) { diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndPlaneAngleUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndPlaneAngleUnit.cxx index 4e603ce90c..23439568c3 100755 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndPlaneAngleUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndPlaneAngleUnit.cxx @@ -53,7 +53,7 @@ void RWStepBasic_RWSiUnitAndPlaneAngleUnit::ReadStep(const Handle(StepData_StepR // --- field : prefix --- RWStepBasic_RWSiUnit reader; - StepBasic_SiPrefix aPrefix = StepBasic_spExa; // by default + StepBasic_SiPrefix aPrefix = StepBasic_spExa; Standard_Boolean hasAprefix = Standard_False; if (data->IsParamDefined(num,1)) { if (data->ParamType(num,1) == Interface_ParamEnum) { diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndRatioUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndRatioUnit.cxx index 6c359aec13..1a71c66acf 100755 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndRatioUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndRatioUnit.cxx @@ -52,7 +52,7 @@ void RWStepBasic_RWSiUnitAndRatioUnit::ReadStep (const Handle(StepData_StepReade // --- field : prefix --- RWStepBasic_RWSiUnit reader; - StepBasic_SiPrefix aPrefix; + StepBasic_SiPrefix aPrefix = StepBasic_spExa; Standard_Boolean hasAprefix = Standard_False; if (data->IsParamDefined(num,1)) { if (data->ParamType(num,1) == Interface_ParamEnum) { diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndVolumeUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndVolumeUnit.cxx index 4c00ee099d..c8e9e87748 100755 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndVolumeUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndVolumeUnit.cxx @@ -43,7 +43,7 @@ void RWStepBasic_RWSiUnitAndVolumeUnit::ReadStep(const Handle(StepData_StepReade if (!data->CheckNbParams(num,2,ach,"si_unit")) return; RWStepBasic_RWSiUnit reader; - StepBasic_SiPrefix aPrefix; + StepBasic_SiPrefix aPrefix = StepBasic_spExa; Standard_Boolean hasAprefix = Standard_False; if (data->IsParamDefined(num,1)) { if (data->ParamType(num,1) == Interface_ParamEnum) { diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx index fc42dc8162..1557e96919 100755 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx @@ -78,7 +78,7 @@ void RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::ReadStep data->NamedForComplex("MODIFIED_GEOMETRIC_TOLERANCE",num0,num,ach); // Own fields of ModifiedGeometricTolerance - StepDimTol_LimitCondition aModifier; + StepDimTol_LimitCondition aModifier = StepDimTol_MaximumMaterialCondition; if (data->ParamType (num, 1) == Interface_ParamEnum) { Standard_CString text = data->ParamCValue(num, 1); if (strcmp(text, ".MAXIMUM_MATERIAL_CONDITION.")==0) aModifier = StepDimTol_MaximumMaterialCondition; diff --git a/src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx index c889617beb..ee2c89ce28 100755 --- a/src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx @@ -59,7 +59,7 @@ void RWStepDimTol_RWModifiedGeometricTolerance::ReadStep (const Handle(StepData_ // Own fields of ModifiedGeometricTolerance - StepDimTol_LimitCondition aModifier; + StepDimTol_LimitCondition aModifier = StepDimTol_MaximumMaterialCondition; if (data->ParamType (num, 5) == Interface_ParamEnum) { Standard_CString text = data->ParamCValue(num, 5); if (strcmp(text, ".MAXIMUM_MATERIAL_CONDITION.")==0) aModifier = StepDimTol_MaximumMaterialCondition; diff --git a/src/RWStepElement/RWStepElement_RWCurve3dElementDescriptor.cxx b/src/RWStepElement/RWStepElement_RWCurve3dElementDescriptor.cxx index e06b4d4371..db5ff23c3f 100755 --- a/src/RWStepElement/RWStepElement_RWCurve3dElementDescriptor.cxx +++ b/src/RWStepElement/RWStepElement_RWCurve3dElementDescriptor.cxx @@ -48,7 +48,7 @@ void RWStepElement_RWCurve3dElementDescriptor::ReadStep (const Handle(StepData_S // Inherited fields of ElementDescriptor - StepElement_ElementOrder aElementDescriptor_TopologyOrder; + StepElement_ElementOrder aElementDescriptor_TopologyOrder = StepElement_Linear; if (data->ParamType (num, 1) == Interface_ParamEnum) { Standard_CString text = data->ParamCValue(num, 1); if (strcmp(text, ".LINEAR.")==0) aElementDescriptor_TopologyOrder = StepElement_Linear; diff --git a/src/RWStepElement/RWStepElement_RWElementDescriptor.cxx b/src/RWStepElement/RWStepElement_RWElementDescriptor.cxx index 0e0a980158..5775ca174b 100755 --- a/src/RWStepElement/RWStepElement_RWElementDescriptor.cxx +++ b/src/RWStepElement/RWStepElement_RWElementDescriptor.cxx @@ -45,7 +45,7 @@ void RWStepElement_RWElementDescriptor::ReadStep (const Handle(StepData_StepRead // Own fields of ElementDescriptor - StepElement_ElementOrder aTopologyOrder; + StepElement_ElementOrder aTopologyOrder = StepElement_Linear; if (data->ParamType (num, 1) == Interface_ParamEnum) { Standard_CString text = data->ParamCValue(num, 1); if (strcmp(text, ".LINEAR.") == 0) aTopologyOrder = StepElement_Linear; diff --git a/src/RWStepElement/RWStepElement_RWSurface3dElementDescriptor.cxx b/src/RWStepElement/RWStepElement_RWSurface3dElementDescriptor.cxx index 71d6c6ab2f..86870b50a4 100755 --- a/src/RWStepElement/RWStepElement_RWSurface3dElementDescriptor.cxx +++ b/src/RWStepElement/RWStepElement_RWSurface3dElementDescriptor.cxx @@ -48,7 +48,7 @@ void RWStepElement_RWSurface3dElementDescriptor::ReadStep (const Handle(StepData // Inherited fields of ElementDescriptor - StepElement_ElementOrder aElementDescriptor_TopologyOrder; + StepElement_ElementOrder aElementDescriptor_TopologyOrder = StepElement_Linear; if (data->ParamType (num, 1) == Interface_ParamEnum) { Standard_CString text = data->ParamCValue(num, 1); if (!strcmp(text, ".LINEAR.")) aElementDescriptor_TopologyOrder = StepElement_Linear; @@ -86,7 +86,7 @@ void RWStepElement_RWSurface3dElementDescriptor::ReadStep (const Handle(StepData } } - StepElement_Element2dShape aShape; + StepElement_Element2dShape aShape = StepElement_Quadrilateral; if (data->ParamType (num, 4) == Interface_ParamEnum) { Standard_CString text = data->ParamCValue(num, 4); if (!strcmp(text, ".QUADRILATERAL.")) aShape = StepElement_Quadrilateral; diff --git a/src/RWStepElement/RWStepElement_RWVolume3dElementDescriptor.cxx b/src/RWStepElement/RWStepElement_RWVolume3dElementDescriptor.cxx index 5784da5cbb..7d79fcc777 100755 --- a/src/RWStepElement/RWStepElement_RWVolume3dElementDescriptor.cxx +++ b/src/RWStepElement/RWStepElement_RWVolume3dElementDescriptor.cxx @@ -47,7 +47,7 @@ void RWStepElement_RWVolume3dElementDescriptor::ReadStep (const Handle(StepData_ // Inherited fields of ElementDescriptor - StepElement_ElementOrder aElementDescriptor_TopologyOrder; + StepElement_ElementOrder aElementDescriptor_TopologyOrder = StepElement_Linear; if (data->ParamType (num, 1) == Interface_ParamEnum) { Standard_CString text = data->ParamCValue(num, 1); if (!strcmp(text, ".LINEAR.")) aElementDescriptor_TopologyOrder = StepElement_Linear; @@ -77,7 +77,7 @@ void RWStepElement_RWVolume3dElementDescriptor::ReadStep (const Handle(StepData_ } } - StepElement_Volume3dElementShape aShape; + StepElement_Volume3dElementShape aShape = StepElement_Hexahedron; if (data->ParamType (num, 4) == Interface_ParamEnum) { Standard_CString text = data->ParamCValue(num, 4); if (!strcmp(text, ".HEXAHEDRON.")) aShape = StepElement_Hexahedron; diff --git a/src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx b/src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx index 9a1c6a923d..aa814d8756 100755 --- a/src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx @@ -75,7 +75,7 @@ void RWStepFEA_RWFeaAxis2Placement3d::ReadStep (const Handle(StepData_StepReader // Own fields of FeaAxis2Placement3d - StepFEA_CoordinateSystemType aSystemType; + StepFEA_CoordinateSystemType aSystemType = StepFEA_Cartesian; if (data->ParamType (num, 5) == Interface_ParamEnum) { Standard_CString text = data->ParamCValue(num, 5); if (strcmp(text, ".CARTESIAN.") == 0) aSystemType = StepFEA_Cartesian; diff --git a/src/SWDRAW/SWDRAW_ShapeTool.cxx b/src/SWDRAW/SWDRAW_ShapeTool.cxx index fee64818f1..c38d48233d 100755 --- a/src/SWDRAW/SWDRAW_ShapeTool.cxx +++ b/src/SWDRAW/SWDRAW_ShapeTool.cxx @@ -200,7 +200,7 @@ static Standard_Integer XSHAPE_edgeregul (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { //cky/rln 03.02.99 To eliminate dependence of SWDRAW on TKXSBase (to use only ShapeHealing) - Standard_Real tolang; // = Interface_Static::RVal("XSTEP.encoderegularity.angle"); + Standard_Real tolang = Precision::Angular(); // = Interface_Static::RVal("XSTEP.encoderegularity.angle"); // if (argc < 3) di<<"Current value for regularity angle : "<NbUPoles(), nbv = bs->NbVPoles(); } // Standard_Real dx = 0, dy = 0, dz = 0; // Standard_Real x,y,z; - Standard_Real minx,miny,minz,maxx,maxy,maxz; + Standard_Real minx = 0.,miny = 0.,minz = 0.,maxx = 0.,maxy = 0.,maxz = 0.; Standard_Boolean issmall = Standard_True; for (iu = 1; iu <= nbu; iu ++) { @@ -426,7 +426,7 @@ static Standard_Boolean MinMaxSmall // Edge on same vertex : small one ? if (VA.IsSame(VB)) { - Standard_Real cf,cl; + Standard_Real cf = 0.,cl = 0.; Handle(Geom_Curve) C3D; if (!BRep_Tool::Degenerated(E)) C3D = BRep_Tool::Curve (E,cf,cl); if (C3D.IsNull()) continue; // DGNR @@ -584,7 +584,7 @@ static Standard_Integer IsoStat Standard_Integer i, np = 0; Standard_Integer i0 = (uorv == 1 ? poles.LowerCol() : poles.LowerRow()); Standard_Integer i1 = (uorv == 1 ? poles.UpperCol() : poles.UpperRow()); - Standard_Real xmin,ymin,zmin, xmax,ymax,zmax; + Standard_Real xmin = 0.,ymin = 0.,zmin = 0., xmax = 0.,ymax = 0.,zmax = 0.; for (i = i0; i <= i1; i ++) { if (uorv == 1) MinMaxPnt (poles(rank,i),np,xmin,ymin,zmin, xmax,ymax,zmax); else MinMaxPnt (poles(i,rank), np, xmin,ymin,zmin, xmax,ymax,zmax); diff --git a/src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.cxx b/src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.cxx index f2ed43b866..55b8d82988 100755 --- a/src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.cxx @@ -202,7 +202,7 @@ Standard_Real ShapeAnalysis_ShapeTolerance::Tolerance(const TopoDS_Shape& shape, void ShapeAnalysis_ShapeTolerance::AddTolerance(const TopoDS_Shape& shape,const TopAbs_ShapeEnum type) { Standard_Integer nbt = 0; - Standard_Real tol, cmin,cmoy,cmax; + Standard_Real tol, cmin = 0.,cmoy = 0.,cmax = 0.; TopExp_Explorer myExp; diff --git a/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx b/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx index 6230b3964c..6308a12e34 100755 --- a/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx @@ -911,7 +911,7 @@ gp_Pnt2d ShapeAnalysis_Surface::NextValueOfUV(const gp_Pnt2d &p2dPrev, gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D,const Standard_Real preci) { GeomAdaptor_Surface& SurfAdapt = Adaptor3d()->ChangeSurface(); - Standard_Real S, T; + Standard_Real S = 0., T = 0.; myGap = -1.; // devra etre calcule Standard_Boolean computed = Standard_True; // a priori diff --git a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx index 5f107268c9..56cb4c3dd7 100755 --- a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx @@ -239,7 +239,7 @@ void ShapeAnalysis_WireOrder::Perform(const Standard_Boolean /*closed*/) while(!done) { Standard_Integer resultType = 3; Standard_Real distmin = RealLast(); - Standard_Integer ledge; + Standard_Integer ledge = 0; Standard_Boolean found = Standard_False; Standard_Real closeDist = wireFirst.SquareDistance(wireLast); diff --git a/src/ShapeConstruct/ShapeConstruct.cxx b/src/ShapeConstruct/ShapeConstruct.cxx index 0bd098c478..4b05cca99d 100755 --- a/src/ShapeConstruct/ShapeConstruct.cxx +++ b/src/ShapeConstruct/ShapeConstruct.cxx @@ -293,7 +293,7 @@ Standard_Boolean ShapeConstruct::JoinPCurves(const Handle(TopTools_HSequenceOfSh Standard_Boolean IsEdgeSeam = Standard_False; Handle(Geom2d_Curve) aCrvRes1, aCrvRes2; TopAbs_Orientation resOrient; - Standard_Real newf,newl; + Standard_Real newf = 0.,newl = 0.; // iterates on edges Standard_Integer i = 1; for(; i <= edges->Length(); i++) { diff --git a/src/ShapeCustom/ShapeCustom_Surface.cxx b/src/ShapeCustom/ShapeCustom_Surface.cxx index 87e536d9e4..da34026799 100755 --- a/src/ShapeCustom/ShapeCustom_Surface.cxx +++ b/src/ShapeCustom/ShapeCustom_Surface.cxx @@ -327,7 +327,7 @@ Handle(Geom_Surface) ShapeCustom_Surface::ConvertToAnalytical (const Standard_Re GeomAdaptor_Surface& SurfAdapt = NHS->ChangeSurface(); const Standard_Integer NP = 21; - Standard_Real S, T; // U,V deja fait + Standard_Real S = 0., T = 0.; // U,V deja fait gp_Pnt P3d, P3d2; Standard_Boolean onSurface = Standard_True; diff --git a/src/ShapeFix/ShapeFix_ComposeShell.cxx b/src/ShapeFix/ShapeFix_ComposeShell.cxx index a0a41c9e60..435cf3524c 100755 --- a/src/ShapeFix/ShapeFix_ComposeShell.cxx +++ b/src/ShapeFix/ShapeFix_ComposeShell.cxx @@ -2001,7 +2001,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires, TopoDS_Vertex firstV, endV; TopoDS_Edge firstEdge, lastEdge; Standard_Real tol = 0; - Standard_Integer iumin, iumax, ivmin, ivmax; + Standard_Integer iumin = 0, iumax = 0, ivmin = 0, ivmax = 0; Standard_Real dsu=0., dsv=0.; Standard_Boolean canBeClosed = Standard_False; for(;;) { diff --git a/src/ShapeFix/ShapeFix_Wire.cxx b/src/ShapeFix/ShapeFix_Wire.cxx index 4d07225a73..7903053f47 100755 --- a/src/ShapeFix/ShapeFix_Wire.cxx +++ b/src/ShapeFix/ShapeFix_Wire.cxx @@ -1343,7 +1343,7 @@ Standard_Boolean ShapeFix_Wire::FixShifted() TopoDS_Vertex V = sae.FirstVertex ( E2 ); gp_Pnt p = BRep_Tool::Pnt ( V ); - Standard_Real a1, b1, a2, b2; + Standard_Real a1 = 0., b1 = 0., a2 = 0., b2 = 0.; Handle(Geom2d_Curve) c2d1, c2d2; //:abv 29.08.01: torCuts.sat: distinguish degeneration by U and by V; @@ -1385,7 +1385,7 @@ Standard_Boolean ShapeFix_Wire::FixShifted() // if ( stop < n2 ) { stop = n2; degstop = Standard_True; } } else { - Standard_Real ax1, bx1, ax2, bx2; + Standard_Real ax1 = 0., bx1 = 0., ax2 = 0., bx2 = 0.; Handle(Geom2d_Curve) cx1, cx2; if ( ( c2d1.IsNull() && ! sae.PCurve ( E1, Face(), c2d1, a1, b1, Standard_True ) ) || ( c2d2.IsNull() && ! sae.PCurve ( E2, Face(), c2d2, a2, b2, Standard_True ) ) || @@ -2108,7 +2108,7 @@ Standard_Boolean ShapeFix_Wire::FixSelfIntersectingEdge (const Standard_Integer // cycle is to verify fix in case of RemoveLoop Standard_Real tolfact = 0.1; // factor for shifting by parameter in RemoveLoop - Standard_Real f2d, l2d; + Standard_Real f2d = 0., l2d = 0.; Handle(Geom2d_Curve) c2d; Standard_Real newtol=0.; // = Precision(); @@ -2744,9 +2744,9 @@ Standard_Boolean ShapeFix_Wire::FixLacking (const Standard_Integer num, //============= //:s2 abv 21 Apr 99: Speculation: try bending pcurves - Standard_Real bendtol1, bendtol2; + Standard_Real bendtol1 = 0., bendtol2 = 0.; Handle(Geom2d_Curve) bendc1, bendc2; - Standard_Real bendf1, bendl1, bendf2, bendl2; + Standard_Real bendf1 = 0., bendl1 = 0., bendf2 = 0., bendl2 = 0.; if ( myGeomMode && ! BRep_Tool::IsClosed(E1,face) && ! BRep_Tool::IsClosed(E2,face) ) { gp_Pnt2d p2d = 0.5 * ( p2d1.XY() + p2d2.XY() ); Standard_Boolean ok1 = TryBendingPCurve (E1, face, p2d, E1.Orientation() == TopAbs_FORWARD, diff --git a/src/ShapeUpgrade/ShapeUpgrade_ClosedEdgeDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_ClosedEdgeDivide.cxx index ca2b3b154e..17313bbbc5 100755 --- a/src/ShapeUpgrade/ShapeUpgrade_ClosedEdgeDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ClosedEdgeDivide.cxx @@ -61,7 +61,7 @@ Standard_Boolean ShapeUpgrade_ClosedEdgeDivide::Compute(const TopoDS_Edge& anEdg Standard_Real f, l; Handle(Geom_Curve) curve3d = BRep_Tool::Curve (anEdge, f, l); myHasCurve3d = !curve3d.IsNull(); - Standard_Real f2d, l2d; + Standard_Real f2d = 0., l2d = 0.; Handle(Geom2d_Curve) pcurve1; if ( ! myFace.IsNull() ) { // process free edges sae.PCurve (anEdge, myFace, pcurve1, f2d, l2d, Standard_False); diff --git a/src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.cxx index a7c0480912..d5ed1ba493 100755 --- a/src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.cxx @@ -71,7 +71,7 @@ Standard_Boolean ShapeUpgrade_EdgeDivide::Compute(const TopoDS_Edge& anEdge) // on pcurve(s): all knots // assume that if seam-edge, its pcurve1 and pcurve2 has the same split knots !!! - Standard_Real f2d, l2d; + Standard_Real f2d = 0., l2d = 0.; Handle(Geom2d_Curve) pcurve1; if ( ! myFace.IsNull() ) { // process free edges ShapeAnalysis_Edge sae; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceAngle.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceAngle.cxx index 5ec3563616..4699cef3a1 100755 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceAngle.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceAngle.cxx @@ -70,7 +70,7 @@ double ShapeUpgrade_SplitSurfaceAngle::MaxAngle () const void ShapeUpgrade_SplitSurfaceAngle::Compute(const Standard_Boolean /*Segment*/) { Handle(Geom_Surface) S; - Standard_Real U1,U2; + Standard_Real U1 = 0.,U2 = 0.; Standard_Boolean isRect = Standard_False; if(mySurface->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))){ Handle(Geom_RectangularTrimmedSurface) rts = diff --git a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx index bf55c99dd2..21ccfe323f 100755 --- a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx @@ -408,7 +408,7 @@ void ShapeUpgrade_WireDivide::Perform () //collect NM vertices - Standard_Real af,al; + Standard_Real af = 0.,al = 0.; Handle(Geom_Curve) c3d; Adaptor3d_CurveOnSurface AdCS; if(myEdgeDivide->HasCurve3d()) diff --git a/src/TNaming/TNaming_Localizer.cxx b/src/TNaming/TNaming_Localizer.cxx index fbdd70ec7c..8060becdfa 100755 --- a/src/TNaming/TNaming_Localizer.cxx +++ b/src/TNaming/TNaming_Localizer.cxx @@ -252,11 +252,9 @@ const TopTools_IndexedDataMapOfShapeListOfShape& TNaming_Localizer::Ancestors TopTools_IndexedDataMapOfShapeListOfShape emptyAnc; myShapeWithAncestors.Prepend(In); myAncestors .Prepend(emptyAnc); -#ifdef DEB - TopAbs_ShapeEnum TA; -#else + TopAbs_ShapeEnum TA=TopAbs_COMPOUND; -#endif + if (TS == TopAbs_VERTEX) TA = TopAbs_EDGE; else if (TS == TopAbs_EDGE) TA = TopAbs_FACE; else if (TS == TopAbs_FACE) TA = TopAbs_SOLID; @@ -557,11 +555,8 @@ void TNaming_Localizer::FindNeighbourg (const TopoDS_Shape& Sol, TopTools_MapOfShape& Neighbourg) { TopAbs_ShapeEnum TA = S.ShapeType(); -#ifdef DEB - TopAbs_ShapeEnum TS; -#else TopAbs_ShapeEnum TS=TopAbs_COMPOUND; -#endif + if (TA == TopAbs_FACE) TS = TopAbs_EDGE; if (TA == TopAbs_EDGE) TS = TopAbs_VERTEX; if (TA == TopAbs_VERTEX) TS = TopAbs_VERTEX; // szy 30.03.10 diff --git a/src/TestTopOpe/TestTopOpe_HDSCommands.cxx b/src/TestTopOpe/TestTopOpe_HDSCommands.cxx index 89e43f3b10..0f0c3313d2 100755 --- a/src/TestTopOpe/TestTopOpe_HDSCommands.cxx +++ b/src/TestTopOpe/TestTopOpe_HDSCommands.cxx @@ -842,11 +842,8 @@ void AddShapeKI // to sort, it is considered that : // POINT == VERTEX,CURVE == EDGE,SURFACE == FACE -#ifdef DEB - TopAbs_ShapeEnum SKtri; -#else TopAbs_ShapeEnum SKtri=TopAbs_COMPOUND; -#endif + if (isshape) SKtri = TopOpeBRepDS::KindToShape(K); else if (isgeome) { if (K == TopOpeBRepDS_POINT) SKtri = TopAbs_VERTEX; diff --git a/src/TopClass/TopClass_Classifier2d.gxx b/src/TopClass/TopClass_Classifier2d.gxx index a60589dfef..4f99de7ce1 100755 --- a/src/TopClass/TopClass_Classifier2d.gxx +++ b/src/TopClass/TopClass_Classifier2d.gxx @@ -82,11 +82,9 @@ void TopClass_Classifier2d::Compare(const TheEdge& E, // find the closest point Standard_Integer iPoint, iSegment, nbPoints, nbSegments; -#ifndef DEB + const IntRes2d_IntersectionPoint *PClosest = NULL; -#else - const IntRes2d_IntersectionPoint *PClosest; -#endif + Standard_Real dMin = RealLast(); nbPoints = myIntersector.NbPoints(); for (iPoint = 1; iPoint <= nbPoints; iPoint++) { @@ -165,11 +163,9 @@ void TopClass_Classifier2d::Compare(const TheEdge& E, // Modified by skv - Wed Jul 12 15:20:58 2006 OCC12627 End // transition on the segment -#ifndef DEB + TopAbs_Orientation SegTrans = TopAbs_FORWARD; -#else - TopAbs_Orientation SegTrans; -#endif + const IntRes2d_Transition& T1 = PClosest->TransitionOfFirst(); switch (T1.TransitionType()) { case IntRes2d_In : @@ -234,14 +230,3 @@ void TopClass_Classifier2d::Compare(const TheEdge& E, myState = myTrans.StateBefore(); } } - - - - - - - - - - - diff --git a/src/TopClass/TopClass_FaceClassifier.gxx b/src/TopClass/TopClass_FaceClassifier.gxx index d6b285605f..ad6285d4b5 100755 --- a/src/TopClass/TopClass_FaceClassifier.gxx +++ b/src/TopClass/TopClass_FaceClassifier.gxx @@ -68,7 +68,7 @@ void TopClass_FaceClassifier::Perform(TheFaceExplorer& Fexp, TopAbs_Orientation anEdgeOri; Standard_Integer aClosestInd; IntRes2d_IntersectionPoint aPInter; - TopAbs_State aState; + TopAbs_State aState = TopAbs_UNKNOWN; Standard_Boolean IsWReject; Standard_Boolean IsEReject; diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx index 449569c570..6560566470 100755 --- a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx @@ -198,11 +198,9 @@ void TopOpeBRep_EdgesFiller::Insert(const TopoDS_Shape& E1,const TopoDS_Shape& E Handle(TopOpeBRepDS_CurvePointInterference) epi = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I); const TopOpeBRepDS_Transition& tevi = epi->Transition(); Standard_Integer sevi = epi->Support(); -#ifdef DEB - Standard_Integer gevi; -#else + Standard_Integer gevi=0; -#endif + if (isvertex1) gevi = myPDS->AddShape(V1,1); else if (isvertex2) gevi = myPDS->AddShape(V2,2); Standard_Boolean bevi = Standard_False; diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx index 7019cc17c4..957947c047 100755 --- a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx @@ -159,12 +159,8 @@ TopOpeBRepDS_Transition TopOpeBRep_EdgesIntersector::Transition1(const Standard_ Standard_Boolean pointofsegment = IsPointOfSegment1(); Standard_Boolean pur1d = (pointofsegment && mySameDomain); -#ifdef DEB - TopAbs_State staB,staA; TopAbs_ShapeEnum shaB,shaA; Standard_Boolean pextremity; -#else TopAbs_State staB=TopAbs_UNKNOWN,staA=TopAbs_UNKNOWN; TopAbs_ShapeEnum shaB=TopAbs_COMPOUND,shaA=TopAbs_COMPOUND; Standard_Boolean pextremity; -#endif TopAbs_State staINON = TopAbs_IN; Standard_Integer dim = myDimension; diff --git a/src/TopOpeBRep/TopOpeBRep_FFDumper.cxx b/src/TopOpeBRep/TopOpeBRep_FFDumper.cxx index 8a78386667..be06fd46b2 100755 --- a/src/TopOpeBRep/TopOpeBRep_FFDumper.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FFDumper.cxx @@ -296,7 +296,7 @@ void TopOpeBRep_FFDumper::DumpDSP(const TopOpeBRep_VPointInter& VP,const TopOpeB cout<<" "<HDataStructure(); - Standard_Real tol; + Standard_Real tol = Precision::Confusion(); if (GK == TopOpeBRepDS_VERTEX) tol = BRep_Tool::Tolerance(TopoDS::Vertex(HDS->Shape(G))); else if (GK == TopOpeBRepDS_POINT) tol = HDS->Point(G).Tolerance(); cout<<" tol = "<DataStructure(),iFOR,iFCX,GI,TopoDS::Edge(EspON),shareG); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Fill.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Fill.hxx index 594f18f680..d1fcb63142 100755 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Fill.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Fill.hxx @@ -34,13 +34,9 @@ void TopOpeBRepBuild_Builder::FillShape(const TopoDS_Shape& S1, const Standard_Boolean In_RevOri) { Standard_Boolean RevOri = In_RevOri; - TopAbs_ShapeEnum t = S1.ShapeType(); -#ifdef DEB - TopAbs_ShapeEnum t1,t11; -#else TopAbs_ShapeEnum t1=TopAbs_COMPOUND,t11=TopAbs_COMPOUND; -#endif + if (t == TopAbs_FACE ) { t1 = TopAbs_WIRE; t11 = TopAbs_EDGE; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx index bed95e8cbd..7d76bf52ea 100755 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx @@ -209,11 +209,9 @@ void TopOpeBRepBuild_Builder::MergeShapes(const TopoDS_Shape& S1,const TopAbs_St // NYI : SplitCompound appele par SplitShape TopOpeBRepTool_ShapeExplorer ex1; -#ifdef DEB - TopAbs_ShapeEnum t1,tex1; -#else + TopAbs_ShapeEnum t1=TopAbs_COMPOUND,tex1=TopAbs_COMPOUND; -#endif + if ( ! S1null ) { t1 = tex1 = TopType(S1); if ( t1 == TopAbs_COMPOUND ) { @@ -236,11 +234,9 @@ void TopOpeBRepBuild_Builder::MergeShapes(const TopoDS_Shape& S1,const TopAbs_St } TopOpeBRepTool_ShapeExplorer ex2; -#ifdef DEB - TopAbs_ShapeEnum t2,tex2; -#else + TopAbs_ShapeEnum t2=TopAbs_COMPOUND,tex2=TopAbs_COMPOUND; -#endif + if ( ! S2null ) { t2 = tex2 = TopType(S2); if ( t2 == TopAbs_COMPOUND ) { diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx index b5613eeed0..9cb3e64f90 100755 --- a/src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx @@ -884,7 +884,7 @@ void TopOpeBRepDS_BuildTool::ComputePCurves Handle(Geom2d_Curve) PC2new; if(C3D.IsNull()) { - Standard_Real tolreached2d1, tolreached2d2, r1, r2, tol=0; + Standard_Real tolreached2d1 = Precision::Confusion(), tolreached2d2 = Precision::Confusion(), r1, r2, tol=Precision::Confusion(); if (comppc1) PC1new = myCurveTool.MakePCurveOnFace(F1,C3D,tolreached2d1); if (comppc2) PC2new = myCurveTool.MakePCurveOnFace(F2,C3D,tolreached2d2); @@ -1152,11 +1152,9 @@ void TopOpeBRepDS_BuildTool::Parameter(const TopoDS_Shape& E, Handle(Geom_Curve) C = BRep_Tool::Curve(e,loc,f,l); if ( !C.IsNull() && C->IsPeriodic()) { Standard_Real per = C->Period(); -#ifdef DEB - TopAbs_Orientation oV; -#else + TopAbs_Orientation oV=TopAbs_FORWARD; -#endif + TopExp_Explorer exV(e,TopAbs_VERTEX); for (; exV.More(); exV.Next()) { const TopoDS_Vertex& vofe = TopoDS::Vertex(exV.Current()); diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx index b917489702..0600d503ad 100755 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx @@ -223,11 +223,9 @@ Standard_Boolean TopOpeBRepDS_Check::CheckDS(const Standard_Integer I, return Standard_False; } const TopoDS_Shape& S =myHDS->Shape(I); -#ifdef DEB - TopAbs_ShapeEnum se; -#else + TopAbs_ShapeEnum se=TopAbs_COMPOUND; -#endif + switch (K) { case TopOpeBRepDS_SOLID : se = TopAbs_SOLID; break; case TopOpeBRepDS_SHELL : se = TopAbs_SHELL; break; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx index af0afce404..02e6a33dde 100755 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx @@ -196,7 +196,7 @@ Standard_OStream& TopOpeBRepDS_Dumper::Print(const Handle(Geom_BSplineCurve)& ) { #ifdef DEB - Standard_Integer i,l,lb,n; + Standard_Integer i,l,lb = 0,n; Standard_Integer degree = B->Degree(); Standard_Integer nbpoles = B->NbPoles(); diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx index 684f16effc..7747fd654b 100755 --- a/src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx @@ -938,7 +938,7 @@ Standard_EXPORT void FUN_ds_completeforSE2(const Handle(TopOpeBRepDS_HDataStruct BDS.ShapeInterferences(SE),par1,par2,isonper); TopOpeBRepTool_makeTransition MKT; - TopAbs_State stb,sta; + TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN; ok = MKT.Initialize(SE,par1,par2,par, FCX,OOuv, factor); if (ok) ok = MKT.SetRest(ES,OOpar); if (ok) ok = MKT.MkTonE(stb,sta); @@ -1015,7 +1015,7 @@ static Standard_Boolean FUN_ds_completeforSE3(const TopOpeBRepDS_DataStructure& Standard_Real factor = 1.e-4; - TopOpeBRepTool_makeTransition MKT; TopAbs_State stb,sta; + TopOpeBRepTool_makeTransition MKT; TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN; ok = MKT.Initialize(SE,par1,par2,parE, F,uv, factor); if (ok) ok = MKT.SetRest(Eline,parline); if (ok) ok = MKT.MkTonE(stb,sta); @@ -1836,7 +1836,7 @@ Standard_EXPORT void FUN_ds_completeforE7(const Handle(TopOpeBRepDS_HDataStructu gp_Pnt2d uvFS; Standard_Boolean ok = FUN_tool_parF(E,par,FS,uvFS); if (!ok) {FUN_Raise(); continue;} - TopOpeBRepTool_makeTransition MKT; TopAbs_State stb,sta; + TopOpeBRepTool_makeTransition MKT; TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN; ok = MKT.Initialize(E,par1,par2,par, FS,uvFS, factor); if (ok) ok = MKT.MkTonE(stb,sta); if (!ok) {FUN_Raise(); continue;} @@ -1850,7 +1850,7 @@ Standard_EXPORT void FUN_ds_completeforE7(const Handle(TopOpeBRepDS_HDataStructu gp_Pnt2d uvFS; ok = FUN_tool_paronEF(ES,parES,FS,uvFS); if (!ok) {FUN_Raise(); continue;} - TopOpeBRepTool_makeTransition MKT; TopAbs_State stb,sta; + TopOpeBRepTool_makeTransition MKT; TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN; ok = MKT.Initialize(E,par1,par2,par, FS,uvFS, factor); if (ok) ok = MKT.SetRest(ES,parES); if (ok) ok = MKT.MkTonE(stb,sta); @@ -2187,7 +2187,7 @@ static Standard_Boolean FUN_redusamshaonE(const TopOpeBRepDS_DataStructure& BDS, gp_Pnt2d uv; ok = FUN_tool_paronEF(ES,parES,FTRA,uv); if (!ok) return Standard_False; - Standard_Real factor = 1.e-2; TopAbs_State stb,sta; + Standard_Real factor = 1.e-2; TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN; TopOpeBRepTool_makeTransition MKT; ok = MKT.Initialize(E,f,l,parE, FTRA,uv, factor); if (ok) ok = MKT.SetRest(ES,parES); diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx index e07a6ee175..5e151a7ae7 100755 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx @@ -328,7 +328,7 @@ Standard_EXPORT void FUN_unkeepEsymetrictransitions Standard_Boolean idshape = ::FUN_transitionSHAPEEQUAL(T1,T2); Standard_Boolean idstate = ::FUN_transitionSTATEEQUAL(T1,T2); Standard_Boolean newV = Standard_True; - Standard_Boolean oppostate; + Standard_Boolean oppostate = Standard_False; if (newV) { // sym is not precise enough (croix3_3-> OUT/IN; ON/OUT) diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx index 5673566fb3..1ee110b170 100755 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx @@ -283,11 +283,7 @@ TopAbs_Orientation TopOpeBRepDS_Transition::Orientation(const TopAbs_State S,con //======================================================================= TopAbs_Orientation TopOpeBRepDS_Transition::OrientationON(const TopAbs_State S,const TopAbs_ShapeEnum ) const // T) const { -#ifdef DEB - TopAbs_Orientation result; -#else TopAbs_Orientation result=TopAbs_FORWARD; -#endif if (myStateBefore == TopAbs_ON && myStateAfter == TopAbs_ON) { #if 0 diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_redu.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_redu.cxx index f4b1695b46..d4452dc85d 100755 --- a/src/TopOpeBRepDS/TopOpeBRepDS_redu.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_redu.cxx @@ -79,7 +79,7 @@ Standard_EXPORT Standard_Boolean FUN_ds_redu2d1d(const TopOpeBRepDS_DataStructur if (!ok) return Standard_False; TopOpeBRepTool_makeTransition MKT; - TopAbs_State stb1,sta1; + TopAbs_State stb1 = TopAbs_UNKNOWN,sta1 = TopAbs_UNKNOWN; ok = MKT.Initialize(SE,pbef,paft,parSE, F,uv, factor); if (ok) ok = MKT.SetRest(E,parE); if (ok) ok = MKT.MkTonE(stb1,sta1); diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_repvg.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_repvg.cxx index 65b16d1f72..adc70c9ec9 100755 --- a/src/TopOpeBRepDS/TopOpeBRepDS_repvg.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_repvg.cxx @@ -139,7 +139,7 @@ Standard_EXPORT void FDS_repvg2 gp_Pnt2d uv; ok = FUN_tool_paronEF(E,pE,F1,uv); if (!ok) {it2.Next();continue;} Standard_Real factor = 0.789; TopOpeBRepTool_makeTransition MKT; - TopAbs_State stb,sta; + TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN; ok = MKT.Initialize(E,pbef,paft,pE, F1,uv, factor); if (ok) ok = MKT.SetRest(E1,pE1); if (ok) ok = MKT.MkTonE(stb,sta); diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_STATE.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_STATE.cxx index 65fc721d17..e81439c23c 100755 --- a/src/TopOpeBRepTool/TopOpeBRepTool_STATE.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_STATE.cxx @@ -72,7 +72,7 @@ void TopOpeBRepTool_STATE::Set(const Standard_Boolean b, Standard_Boolean TopOpeBRepTool_STATE::Get(const TopAbs_State S) { - Standard_Boolean b; + Standard_Boolean b = Standard_False; switch(S) { case TopAbs_IN : b = myin; break; case TopAbs_OUT : b = myout; break; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.cxx index 2f0bc35ddf..33f19019a6 100755 --- a/src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.cxx @@ -1177,11 +1177,9 @@ Standard_EXPORT void FUN_ds_Parameter(const TopoDS_Shape& E,const TopoDS_Shape& Handle(Geom_Curve) C = BRep_Tool::Curve(e,loc,f,l); if ( !C.IsNull() && C->IsPeriodic()) { Standard_Real per = C->Period(); -#ifdef DEB - TopAbs_Orientation oV; -#else + TopAbs_Orientation oV=TopAbs_FORWARD; -#endif + TopExp_Explorer exV(e,TopAbs_VERTEX); for (; exV.More(); exV.Next()) { const TopoDS_Vertex& vofe = TopoDS::Vertex(exV.Current()); diff --git a/src/V3d/V3d.cxx b/src/V3d/V3d.cxx index d3bef1ac0e..a43f8d18b2 100755 --- a/src/V3d/V3d.cxx +++ b/src/V3d/V3d.cxx @@ -140,8 +140,8 @@ Graphic3d_Vector Vec ; void V3d::ArrowOfRadius(const Handle(Graphic3d_Group)& garrow,const Standard_Real X0,const Standard_Real Y0,const Standard_Real Z0,const Standard_Real Dx,const Standard_Real Dy,const Standard_Real Dz,const Standard_Real Alpha,const Standard_Real Lng) { - Standard_Real Xc,Yc,Zc,Xi,Yi,Zi,Xj,Yj,Zj; - Standard_Real Xn,Yn,Zn,X,Y,Z,X1,Y1,Z1,Norme; + Standard_Real Xc, Yc, Zc, Xi, Yi, Zi, Xj, Yj, Zj; + Standard_Real Xn, Yn, Zn, X, Y, Z, X1 = 0., Y1 = 0., Z1 = 0., Norme; const Standard_Integer NbPoints = 10; // Centre du cercle base de la fleche : @@ -262,7 +262,7 @@ void V3d::DrawSphere(const Handle(V3d_Viewer)& aViewer,const Quantity_Length ray const Standard_Real Dbeta = 2. * M_PI / NFACES; const Standard_Real Dalpha = 2. * M_PI / NFACES; - Standard_ShortReal X,Y,Z,X0,Y0,Z0; + Standard_ShortReal X,Y,Z,X0 = 0.,Y0 = 0.,Z0 = 0.; Standard_Real R, Alpha, Beta = 0.; Standard_Integer i,j ; for( j=0; j= 3) { Standard_Boolean isIsoOnPlane = Standard_False; diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index 1c808eac25..444a365c7a 100755 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -312,11 +312,8 @@ static int VSize (Draw_Interpretor& di, Standard_Integer argc, const char** argv Standard_Boolean ThereIsCurrent; Standard_Real value; Standard_Boolean hascol; -#ifdef DEB - Quantity_NameOfColor col; -#else + Quantity_NameOfColor col = Quantity_NOC_BLACK ; -#endif // Verification des arguments if ( argc>3 ) {di<SetBgImageStyle(aFillType, Standard_True); - return 0; } @@ -4267,7 +4261,7 @@ static Standard_Integer VZClipping (Draw_Interpretor& di, return 1; } Handle(V3d_View) aView = ViewerTest::CurrentView(); - V3d_TypeOfZclipping aZClippingMode; + V3d_TypeOfZclipping aZClippingMode = V3d_OFF; if(argc==1) { TCollection_AsciiString aZClippingModeString; diff --git a/src/Visual3d/Visual3d_View.cxx b/src/Visual3d/Visual3d_View.cxx index 3a75172b1b..7570325383 100755 --- a/src/Visual3d/Visual3d_View.cxx +++ b/src/Visual3d/Visual3d_View.cxx @@ -753,10 +753,10 @@ CALL_DEF_LIGHT *lights=NULL; Standard_Real X, Y, Z; -Standard_Real LightConcentration; -Standard_Real LightAttenuation1; -Standard_Real LightAttenuation2; -Standard_Real LightAngle; +Standard_Real LightConcentration = 0.; +Standard_Real LightAttenuation1 = 0.; +Standard_Real LightAttenuation2 = 0.; +Standard_Real LightAngle = 0.; Quantity_Color LightColor; Graphic3d_Vertex LightPosition; Graphic3d_Vector LightDirection; diff --git a/src/VrmlData/VrmlData_Material.cxx b/src/VrmlData/VrmlData_Material.cxx index 5681936272..5b109384fb 100755 --- a/src/VrmlData/VrmlData_Material.cxx +++ b/src/VrmlData/VrmlData_Material.cxx @@ -190,7 +190,7 @@ VrmlData_ErrorStatus VrmlData_Material::Read (VrmlData_InBuffer& theBuffer) VrmlData_ErrorStatus VrmlData_Material::Write (const char * thePrefix) const { - VrmlData_ErrorStatus aStatus; + VrmlData_ErrorStatus aStatus = VrmlData_StatusOK; const VrmlData_Scene& aScene = Scene(); static char header[] = "Material {"; if (aScene.IsDummyWrite() == Standard_False && diff --git a/src/VrmlData/VrmlData_Node.cxx b/src/VrmlData/VrmlData_Node.cxx index 1cc491cbb1..e4997eac06 100755 --- a/src/VrmlData/VrmlData_Node.cxx +++ b/src/VrmlData/VrmlData_Node.cxx @@ -446,7 +446,7 @@ Standard_Boolean VrmlData_ShapeNode::IsDefault () const VrmlData_ErrorStatus VrmlData_UnknownNode::Read (VrmlData_InBuffer& theBuffer) { - VrmlData_ErrorStatus aStatus; + VrmlData_ErrorStatus aStatus = VrmlData_StatusOK; Standard_Integer aLevelCounter (0); // This loop searches for any opening brace. // Such brace increments the level counter. A closing brace decrements diff --git a/src/VrmlData/VrmlData_Scene.cxx b/src/VrmlData/VrmlData_Scene.cxx index 25e4400de8..6105142c44 100755 --- a/src/VrmlData/VrmlData_Scene.cxx +++ b/src/VrmlData/VrmlData_Scene.cxx @@ -701,7 +701,7 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadXYZ Standard_Boolean isOnlyPos) const { Standard_Real aVal[3] = {0., 0., 0.}; - VrmlData_ErrorStatus aStatus; + VrmlData_ErrorStatus aStatus = VrmlData_StatusOK; for (Standard_Integer i = 0; i < 3; i++) { if (!VrmlData_Node::OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) break; @@ -740,7 +740,7 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadXY Standard_Boolean isOnlyPos) const { Standard_Real aVal[2] = {0., 0.}; - VrmlData_ErrorStatus aStatus; + VrmlData_ErrorStatus aStatus = VrmlData_StatusOK; for (Standard_Integer i = 0; i < 2; i++) { if (!VrmlData_Node::OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) break; diff --git a/src/WNT/EHDC.cxx b/src/WNT/EHDC.cxx index 28bca44436..db6a88c896 100755 --- a/src/WNT/EHDC.cxx +++ b/src/WNT/EHDC.cxx @@ -1127,7 +1127,7 @@ void EHDC :: _ETextOut ( int x, int y, void* str, double angle, BOOL fOutline, B int i; DWORD dwLen; HPEN hpo; - HBRUSH hbo; + HBRUSH hbo = NULL; HFONT hfo; XFORM lXfm, rXfm, xfm; PXFORM pXfm; @@ -1566,7 +1566,7 @@ static void WINAPI _XFORMApplyf ( PFPOINT pp, int n, PXFORM xf ) { static void WINAPI _RenderPath ( HDC hdc, LPPOINT lpPts, PBYTE lpType, int nPts ) { - LPPOINT pp; + LPPOINT pp = NULL; for ( int i = 0; i < nPts; ++i ) { diff --git a/src/WNT/W95_Allocator.cxx b/src/WNT/W95_Allocator.cxx index 16d2e54cfa..e577eeb7e1 100755 --- a/src/WNT/W95_Allocator.cxx +++ b/src/WNT/W95_Allocator.cxx @@ -791,7 +791,7 @@ void W32_ImageNote :: Play ( BOOL ) { int Ymin = MIN4( Y1, Y2, Y3, Y4 ); PINT line1, line2, line3, line4; PPOINT lines; - HBITMAP hbo2, hBmp; + HBITMAP hbo2 = NULL, hBmp = NULL; if ( fScale ) { diff --git a/src/XSDRAWIGES/XSDRAWIGES.cxx b/src/XSDRAWIGES/XSDRAWIGES.cxx index fba8546a23..2963f33ac9 100755 --- a/src/XSDRAWIGES/XSDRAWIGES.cxx +++ b/src/XSDRAWIGES/XSDRAWIGES.cxx @@ -431,7 +431,7 @@ static Standard_Integer brepiges (Draw_Interpretor& di, Standard_Integer n, cons // Mode d emploi (K4B ->) : brepiges shape [+shape][ +shape] nomfic // c a d tant qu il y a des + on ajoute ce qui suit - const char* nomfic; + const char* nomfic = NULL; Standard_Integer npris = 0; Handle(Draw_ProgressIndicator) progress = new Draw_ProgressIndicator ( di, 1 );