0024059: Eliminate compiler warning C4701 in MSVC++ with warning level 4
authoromy <omy@opencascade.com>
Thu, 22 Aug 2013 08:07:14 +0000 (12:07 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 22 Aug 2013 08:08:59 +0000 (12:08 +0400)
Removing pPotentially uninitialized local variable
Got rid of most of warnings C4701: Potentially uninitialized local variable
Removed redundant variable definitions.
Refactored a part of AppParCurves_ResolConstraint CTOR.
Replaced 0. to Precision::Confusion for tolerance vars;
Changed values for min and max parameter vars;
Got rid of redundant variables' initialization.

196 files changed:
src/AIS/AIS_Axis.cxx
src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx
src/Adaptor3d/Adaptor3d_TopolTool.cxx
src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx
src/AdvApp2Var/AdvApp2Var_Iso.cxx
src/AdvApp2Var/AdvApp2Var_MathBase.cxx
src/AdvApp2Var/AdvApp2Var_SysBase.cxx
src/AdvApprox/AdvApprox_SimpleApprox.cxx
src/AppParCurves/AppParCurves_ResolConstraint.gxx
src/AppParCurves/AppParCurves_Variational_1.gxx
src/Approx/Approx_ComputeCLine.gxx
src/BOPAlgo/BOPAlgo_BOP.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx
src/BOPDS/BOPDS_DS.cxx
src/BOPTools/BOPTools_AlgoTools.cxx
src/BOPTools/BOPTools_AlgoTools3D.cxx
src/BOPTools/BOPTools_AlgoTools_1.cxx
src/BOPTools/BOPTools_AlgoTools_2.cxx
src/BRep/BRep_Builder.cxx
src/BRepAlgo/BRepAlgo.cxx
src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx
src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx
src/BRepCheck/BRepCheck_Wire.cxx
src/BRepClass3d/BRepClass3d_SClassifier.cxx
src/BRepExtrema/BRepExtrema_DistanceSS.cxx
src/BRepFeat/BRepFeat.cxx
src/BRepFeat/BRepFeat_Form.cxx
src/BRepFeat/BRepFeat_MakePrism.cxx
src/BRepFill/BRepFill_CompatibleWires.cxx
src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx
src/BRepFill/BRepFill_Evolved.cxx
src/BRepFill/BRepFill_Filling.cxx
src/BRepFill/BRepFill_Generator.cxx
src/BRepFill/BRepFill_MultiLine.cxx
src/BRepFill/BRepFill_OffsetWire.cxx
src/BRepFill/BRepFill_SectionPlacement.cxx
src/BRepLib/BRepLib_MakeFace.cxx
src/BRepMesh/BRepMesh_Classifier.cxx
src/BRepMesh/BRepMesh_IncrementalMesh.cxx
src/BRepOffset/BRepOffset_Inter3d.cxx
src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx
src/BRepTest/BRepTest_CurveCommands.cxx
src/BRepTools/BRepTools_ShapeSet.cxx
src/BinTools/BinTools_ShapeSet.cxx
src/Blend/Blend_CSWalking_2.gxx
src/Blend/Blend_Walking_1.gxx
src/Blend/Blend_Walking_2.gxx
src/Blend/Blend_Walking_3.gxx
src/Blend/Blend_Walking_4.gxx
src/ChFi3d/ChFi3d_Builder_0.cxx
src/ChFi3d/ChFi3d_Builder_2.cxx
src/ChFi3d/ChFi3d_Builder_6.cxx
src/ChFi3d/ChFi3d_Builder_C1.cxx
src/ChFi3d/ChFi3d_Builder_C2.cxx
src/ChFi3d/ChFi3d_Builder_CnCrn.cxx
src/ChFi3d/ChFi3d_Builder_SpKP.cxx
src/ChFi3d/ChFi3d_FilBuilder_C2.cxx
src/ChFiDS/ChFiDS_FilSpine.cxx
src/Contap/Contap_ContourGen_2.gxx
src/Contap/Contap_ContourGen_3.gxx
src/Convert/Convert_ConicToBSplineCurve.cxx
src/DBRep/DBRep.cxx
src/DDF/DDF_IOStream.cxx
src/Draft/Draft_Modification_1.cxx
src/Draw/Draw.cxx
src/Draw/Draw_GraphicCommands.cxx
src/DrawTrSurf/DrawTrSurf.cxx
src/Dynamic/Dynamic.cxx
src/Extrema/Extrema_GenExtCS.cxx
src/GCPnts/GCPnts_TangentialDeflection.gxx
src/Geom/Geom_OffsetSurface.cxx
src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx
src/GeomAdaptor/GeomAdaptor_Curve.cxx
src/GeomFill/GeomFill_CorrectedFrenet.cxx
src/GeomFill/GeomFill_GuideTrihedronPlan.cxx
src/GeomFill/GeomFill_TgtOnCoons.cxx
src/GeomLib/GeomLib.cxx
src/GeometryTest/GeometryTest_APICommands.cxx
src/GeomliteTest/GeomliteTest_ApproxCommands.cxx
src/HLRAlgo/HLRAlgo_PolyAlgo.cxx
src/HLRAlgo/HLRAlgo_PolyInternalData.cxx
src/HLRAlgo/HLRAlgo_PolyShellData.cxx
src/HLRBRep/HLRBRep_PolyAlgo.cxx
src/HLRBRep/HLRBRep_ShapeToHLR.cxx
src/IGESAppli/IGESAppli_ToolLineWidening.cxx
src/IGESData/IGESData_ParamReader.cxx
src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx
src/IGESGeom/IGESGeom_ToolConicArc.cxx
src/IGESGeom/IGESGeom_ToolPlane.cxx
src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx
src/IGESToBRep/IGESToBRep_TopoSurface.cxx
src/Image/Image_Diff.cxx
src/IntCurve/IntCurve_IntConicConic_1.cxx
src/IntCurveSurface/IntCurveSurface_Inter.gxx
src/IntCurveSurface/IntCurveSurface_Polyhedron.gxx
src/IntPatch/IntPatch_ALineToWLine.cxx
src/IntPatch/IntPatch_ImpImpIntersection_0.gxx
src/IntPatch/IntPatch_ImpPrmIntersection.cxx
src/IntPatch/IntPatch_RstInt.cxx
src/IntStart/IntStart_SearchOnBoundaries_1.gxx
src/IntTools/IntTools_BeanFaceIntersector.cxx
src/IntTools/IntTools_EdgeEdge_1.cxx
src/IntTools/IntTools_EdgeFace.cxx
src/IntWalk/IntWalk_IWalking_4.gxx
src/IntWalk/IntWalk_PWalking_4.gxx
src/Interface/Interface_FloatWriter.cxx
src/LDOM/LDOM_XmlReader.cxx
src/Law/Law_BSpFunc.cxx
src/LocOpe/LocOpe_BuildShape.cxx
src/LocOpe/LocOpe_CSIntersector.cxx
src/LocOpe/LocOpe_CurveShapeIntersector.cxx
src/LocOpe/LocOpe_Generator.cxx
src/LocOpe/LocOpe_SplitDrafts.cxx
src/LocOpe/LocOpe_SplitShape.cxx
src/MAT2d/MAT2d_Tool2d.cxx
src/MeshVS/MeshVS_MeshPrsBuilder.cxx
src/NIS/NIS_View.cxx
src/OpenGl/OpenGl_GraduatedTrihedron.cxx
src/OpenGl/OpenGl_View_2.cxx
src/Primitives/Primitives_Wedge.gxx
src/ProjLib/ProjLib_CompProjectedCurve.cxx
src/ProjLib/ProjLib_ComputeApprox.cxx
src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx
src/ProjLib/ProjLib_ProjectedCurve.cxx
src/QABugs/QABugs_11.cxx
src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx
src/QANewBRepNaming/QANewBRepNaming_Loader.cxx
src/QANewModTopOpe/QANewModTopOpe.cxx
src/QANewModTopOpe/QANewModTopOpe_Glue_shell.cxx
src/RWStepBasic/RWStepBasic_RWSiUnit.cxx
src/RWStepBasic/RWStepBasic_RWSiUnitAndAreaUnit.cxx
src/RWStepBasic/RWStepBasic_RWSiUnitAndPlaneAngleUnit.cxx
src/RWStepBasic/RWStepBasic_RWSiUnitAndRatioUnit.cxx
src/RWStepBasic/RWStepBasic_RWSiUnitAndVolumeUnit.cxx
src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx
src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx
src/RWStepElement/RWStepElement_RWCurve3dElementDescriptor.cxx
src/RWStepElement/RWStepElement_RWElementDescriptor.cxx
src/RWStepElement/RWStepElement_RWSurface3dElementDescriptor.cxx
src/RWStepElement/RWStepElement_RWVolume3dElementDescriptor.cxx
src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx
src/SWDRAW/SWDRAW_ShapeTool.cxx
src/Select3D/Select3D_SensitiveFace.cxx
src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.cxx
src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.cxx
src/ShapeAnalysis/ShapeAnalysis_Surface.cxx
src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx
src/ShapeConstruct/ShapeConstruct.cxx
src/ShapeCustom/ShapeCustom_Surface.cxx
src/ShapeFix/ShapeFix_ComposeShell.cxx
src/ShapeFix/ShapeFix_Wire.cxx
src/ShapeUpgrade/ShapeUpgrade_ClosedEdgeDivide.cxx
src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.cxx
src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceAngle.cxx
src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx
src/TNaming/TNaming_Localizer.cxx
src/TestTopOpe/TestTopOpe_HDSCommands.cxx
src/TopClass/TopClass_Classifier2d.gxx
src/TopClass/TopClass_FaceClassifier.gxx
src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx
src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx
src/TopOpeBRep/TopOpeBRep_FFDumper.cxx
src/TopOpeBRep/TopOpeBRep_FFTransitionTool.cxx
src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.cxx
src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx
src/TopOpeBRep/TopOpeBRep_VPointInter.cxx
src/TopOpeBRep/TopOpeBRep_kpart.cxx
src/TopOpeBRep/TopOpeBRep_mergePDS.cxx
src/TopOpeBRep/TopOpeBRep_vprclo.cxx
src/TopOpeBRep/TopOpeBRep_vprdeg.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON2d.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Fill.hxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx
src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx
src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx
src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx
src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx
src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx
src/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx
src/TopOpeBRepDS/TopOpeBRepDS_redu.cxx
src/TopOpeBRepDS/TopOpeBRepDS_repvg.cxx
src/TopOpeBRepTool/TopOpeBRepTool_STATE.cxx
src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.cxx
src/V3d/V3d.cxx
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/Visual3d/Visual3d_View.cxx
src/VrmlData/VrmlData_Material.cxx
src/VrmlData/VrmlData_Node.cxx
src/VrmlData/VrmlData_Scene.cxx
src/WNT/EHDC.cxx
src/WNT/W95_Allocator.cxx
src/XSDRAWIGES/XSDRAWIGES.cxx

index 55c00c2..0eaf8f3 100755 (executable)
@@ -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);
     
index 8705445..84013ac 100755 (executable)
@@ -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); 
+  { 
+    Standard_Integer 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) {
-        TColStd_Array1OfReal Arr2(1,BSplS->NbVKnots());
-        BSplS->VKnots(Arr2); //   Up2=Arr2.Upper(); Down2=Arr2.Lower();
-        FindBounds(Arr2,cur,DUV.Y(),Bnd1,Bnd2,DIsNull); 
+      else if(Index==2)
+      { 
+        LeftBot.SetY(BSplS->VKnot(Bnd1));
+        RightTop.SetY(BSplS->VKnot(Bnd2));
       }
-      
-      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
     {
-      if( (Index==1)&&(Comp1 < BSplS->UKnot(Down)) )
-       { LeftBot.SetX(BSplS->UKnot(Down)); 
-         RightTop.SetX( BSplS->UKnot(Down + 1) );
-         return; }
+      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)) && (i<Up)) 
+          {
+            i++;
+          }
+        }
+        else if (Index==2)
+        {
+          while (!(((f=BSplS->VKnot(i)) < Comp1)&&((l=BSplS->VKnot(i+1)) > Comp1)) && (i<Up)) 
+          {
+            i++;
+          }
+        }
+      }
       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)) && (i<Up)) i++;
-               else
-                 if( (Index==2)&&(!(Comp1 < BSplS->VKnot(Down)))&&(!(Comp1 > BSplS->VKnot(Up))) )
-                   while (!(((f=BSplS->VKnot(i)) < Comp1)&&((l=BSplS->VKnot(i+1)) > Comp1)) && (i<Up)) i++;
-                 else
-                   ReverseParam(f,l,f,l);
-               
-               if(i!=Up){
-                 if(Abs(DComp1)>Tol)
-                   {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)<Tol)
-                       {if(Index==1){LeftBot.SetX(f); RightTop.SetX(l);}          else
-                          if(Index==2) { LeftBot.SetY(f); RightTop.SetY(l);}
-                      }
-                   }
-               }else
-                 if(i==Up){if(Index==1){LeftBot.SetX(Comp1); RightTop.SetX(BSplS->UKnot(i));} else
-                             if(Index==2) { LeftBot.SetY(Comp1); RightTop.SetY(BSplS->VKnot(i));}
-                         }
-             }
+        ReverseParam(f,l,f,l);
+
+      if(i!=Up)
+      {
+        if(Abs(DComp1)>Tol)
+        {
+          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)<Tol)
+          {
+            if(Index==1)
+            {
+              LeftBot.SetX(f); 
+              RightTop.SetX(l);
+            }
+            else if(Index==2) 
+            { 
+              LeftBot.SetY(f); 
+              RightTop.SetY(l);
+            }
+          }
+        }
+      } 
+      else if(i==Up)
+      {
+        if(Index==1)
+        {
+          LeftBot.SetX(Comp1);
+          RightTop.SetX(BSplS->UKnot(i));
+        }
+        else if(Index==2)
+        { 
+          LeftBot.SetY(Comp1); 
+          RightTop.SetY(BSplS->VKnot(i));
+        }
+      }
     }
+  }
 }
 //=======================================================================
 //function :Locate2Coord
index cfaa83d..f852a0c 100755 (executable)
@@ -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) {
index cf529d3..0e717dd 100755 (executable)
@@ -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;
 
index 91e367d..dbf6eee 100755 (executable)
@@ -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();
index 110ff02..fab4947 100755 (executable)
@@ -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;
index 576214e..696b3d2 100755 (executable)
@@ -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;
   
   
index fc0476c..b38f15f 100755 (executable)
@@ -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.;
index 7c074d4..a2e4a5f 100755 (executable)
@@ -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;
     }
   }
 
index 1cad36f..e4ec1ce 100755 (executable)
@@ -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;
 }
-
-
-
-
-
index 00562f5..d88e110 100755 (executable)
@@ -28,6 +28,7 @@
 #include <TColStd_Array1OfReal.hxx>
 #include <AppParCurves_Constraint.hxx>
 #include <Approx_Status.hxx>
+#include <Precision.hxx>
 
 //=======================================================================
 //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:
index 3def311..56e8461 100644 (file)
@@ -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;
index 977430f..0227710 100644 (file)
@@ -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;
index cc6f879..9e4a91f 100644 (file)
@@ -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;
index 59439bc..5611f37 100644 (file)
@@ -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;
index dac4e6f..1ca2a76 100644 (file)
@@ -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;
index 4d99c15..924f85e 100644 (file)
@@ -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();
index e57f762..f75982b 100644 (file)
@@ -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;
index 5ab0f4f..2c501de 100755 (executable)
@@ -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());
index da2b79a..68bf4c0 100755 (executable)
@@ -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);
index 3215bb9..a8d22c6 100755 (executable)
@@ -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);
index 61eae61..e72b0e1 100755 (executable)
@@ -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);
index 25610f0..0fb2df2 100755 (executable)
@@ -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); 
index d4758ee..45ab28b 100755 (executable)
@@ -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) {
index dea6e55..e39c17c 100755 (executable)
@@ -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;
index 7d6940a..539a279 100755 (executable)
@@ -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();
index c4d2422..6ce9b8f 100755 (executable)
@@ -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
index 493ad8d..18c0510 100755 (executable)
@@ -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);
   }
index 00686ec..349db51 100755 (executable)
@@ -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
index 4ef7208..766983f 100755 (executable)
@@ -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);
index c77341d..bc6edb1 100755 (executable)
@@ -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()) {
index 038aab0..6645231 100755 (executable)
@@ -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;
       
index e660d66..73e3a71 100755 (executable)
@@ -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++) {
 
index c02477b..ec008d9 100755 (executable)
@@ -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;
index 27d2a0c..2b515f3 100755 (executable)
@@ -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) );
index 96e4de5..7055ec7 100755 (executable)
@@ -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;
index 2e9f8cb..5c7d9cd 100755 (executable)
@@ -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);
index 03ce5db..c553afe 100755 (executable)
@@ -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++)
     {
index 50c349d..9e4853c 100755 (executable)
@@ -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;
index ea1bc30..a5e5658 100755 (executable)
@@ -45,6 +45,7 @@
 #include <TopTools_IndexedMapOfShape.hxx>
 #include <Extrema_ExtPC.hxx>
 #include <TopTools_MapOfShape.hxx>
+#include <Precision.hxx>
 
 
 
@@ -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);
 
index cf3c5f5..940d1ca 100644 (file)
@@ -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();
       }
     }
   }
index 9ec9169..9a771eb 100755 (executable)
@@ -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;
   
index eef394c..8531773 100755 (executable)
@@ -21,7 +21,7 @@
 // Modifed:     Portage NT 7-5-97 DPF (strcasecmp)
 
 #include <Standard_Stream.hxx>
-
+#include <Precision.hxx>
 #include <BRepTools_ShapeSet.ixx>
 
 #include <BRepTools.hxx>
@@ -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;
index 4c41df5..4eddfb2 100755 (executable)
@@ -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;
index 9dd6703..374ec5b 100755 (executable)
@@ -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();
index e9afc14..1dffbb5 100755 (executable)
@@ -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;
 
index c1a07e3..2768847 100755 (executable)
@@ -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;
index bc662e4..92e5000 100755 (executable)
@@ -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;
index 2fb2e54..a644b96 100755 (executable)
@@ -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,
   }
 
 }
-
-
-
-
-
-
-
-
-
index 0ce5646..211cbc8 100755 (executable)
@@ -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;
index 4083101..ae743a7 100755 (executable)
@@ -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);
index 20bec9e..1e79f9a 100755 (executable)
@@ -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);
index 18e7db2..83cd64d 100755 (executable)
@@ -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()){
index 9bdbd45..f3e4868 100755 (executable)
@@ -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)) {
index b650f00..4646905 100755 (executable)
@@ -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);
index ecc5ebf..1a02f47 100755 (executable)
@@ -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();
index d9b72d2..e22c840 100755 (executable)
@@ -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);
index 71dad82..6329cfe 100755 (executable)
@@ -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++)
     {
index 52fbbd3..5dc9d8a 100755 (executable)
@@ -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;
index 7ac1d57..fb5b95b 100755 (executable)
@@ -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);
index 056ac80..30ff17a 100755 (executable)
@@ -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 ;
 
index 38d598c..f207074 100755 (executable)
@@ -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;
index 83fbbf9..bb1b70d 100755 (executable)
@@ -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();
index a2ca0bf..a7800c5 100755 (executable)
@@ -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();
index d654dd2..7780a13 100755 (executable)
@@ -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)
index 13d485b..b7dcd05 100755 (executable)
@@ -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)
   {
index 1950df7..37b3ca1 100755 (executable)
@@ -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
index f7434e2..0b80214 100755 (executable)
 
 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;
index 3b2639c..b085503 100755 (executable)
@@ -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)
       {
index d12bd58..7063058 100755 (executable)
@@ -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;
index 097e143..0f80fd4 100755 (executable)
@@ -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)) {
index 43946ad..42219c3 100755 (executable)
@@ -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;
index b4f4a76..ba17969 100755 (executable)
@@ -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;
index 406116f..3fceb0d 100755 (executable)
@@ -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;
index 5540963..888b5c6 100755 (executable)
@@ -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();
   
index 654139b..711d134 100755 (executable)
@@ -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);
index b7cc55a..31e54cf 100755 (executable)
@@ -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);
 
index 6cb85a2..f78e23d 100755 (executable)
@@ -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()) {
index 71a8004..ba8bb1f 100755 (executable)
@@ -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;
 
index 70e5191..3abcab3 100755 (executable)
@@ -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++) {
index 953555c..d0a56f3 100755 (executable)
@@ -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;
index 381f497..0985143 100755 (executable)
@@ -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++) {
index 4d02250..f658f22 100755 (executable)
@@ -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();
   
index 53ab5c8..e60d809 100755 (executable)
@@ -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++;
 
index 50f644b..0eeece1 100755 (executable)
@@ -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
index 32a6b54..fe060ff 100755 (executable)
@@ -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)  &&
index ffcb43b..355db37 100755 (executable)
@@ -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;
index 312a312..60756e0 100755 (executable)
@@ -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
index 92bbb43..2707967 100755 (executable)
@@ -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;
index 099e651..7647849 100755 (executable)
@@ -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);
index e65114c..fe1b793 100755 (executable)
@@ -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())
index f9249ee..bcedb7b 100644 (file)
@@ -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)
   {
index 6432d04..2455dac 100755 (executable)
@@ -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
index ba48975..9f729fa 100755 (executable)
@@ -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          --
   //----------------------------------------------------------------------
index 5916858..802fa38 100755 (executable)
@@ -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;
index 6d2f879..39004b6 100755 (executable)
@@ -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.);
index ac53243..9b099ba 100755 (executable)
@@ -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;
 
index c2a063b..bd39936 100755 (executable)
@@ -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;
   
index 18d1e4c..ae33cf2 100755 (executable)
@@ -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;
index aa5b9e3..c99c746 100755 (executable)
@@ -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;
   
 
index 975e5e0..1e92ff5 100755 (executable)
@@ -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];
index d184d4f..77aa02d 100644 (file)
@@ -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];
   
index 649fec2..1402429 100755 (executable)
@@ -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);
index a87fd9a..849ce90 100755 (executable)
@@ -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
index 26c35e1..69dacc3 100755 (executable)
@@ -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;
index afba0c0..6d57b9b 100755 (executable)
@@ -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';
index 5a274aa..9f0c024 100755 (executable)
@@ -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';
 
index f97f10f..aac0935 100755 (executable)
@@ -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;
index 5c043a4..c51b356 100755 (executable)
@@ -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;
     }
index 4c2c8b0..42fc645 100755 (executable)
@@ -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
index a844cbe..ad97f71 100755 (executable)
@@ -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();
index e99c9f2..7c04a53 100755 (executable)
@@ -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;
index a375881..aa77905 100755 (executable)
@@ -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);
index 87cfbbb..611fd58 100755 (executable)
@@ -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());
index fb9e735..927eb21 100755 (executable)
@@ -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;
 
index dce4b89..0088485 100755 (executable)
@@ -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 );
index 3711924..37a24aa 100755 (executable)
@@ -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() };
index de72c8c..41b8a94 100644 (file)
@@ -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)
index 2e2b5f6..a9faf46 100644 (file)
@@ -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);
index bdaa52e..bb67ed2 100755 (executable)
@@ -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 :
index 5d32f25..132068f 100755 (executable)
@@ -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; 
 
index 2c4a504..e50adb3 100755 (executable)
@@ -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:
index 8fde532..e9df2b5 100755 (executable)
@@ -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:
 //      {
index 97d9c0f..2f5911a 100755 (executable)
@@ -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);
        }
index 231ec0b..d0aebf4 100755 (executable)
@@ -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];
index ebf1057..55a0f3c 100755 (executable)
@@ -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++) {
index 14f9ea2..4b4724d 100755 (executable)
@@ -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<BRepAlgoAPI_BooleanOperation *>(&MS));
   for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
index 9d9bcd4..9614612 100755 (executable)
@@ -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++) {
 
index 54bcb61..b9074d5 100755 (executable)
@@ -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;
index ef25ee5..3c167a4 100755 (executable)
@@ -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))
index 76c61b5..de3fad6 100755 (executable)
@@ -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) {
index 4e603ce..2343956 100755 (executable)
@@ -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) {
index 6c359ae..1a71c66 100755 (executable)
@@ -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) {
index 4c00ee0..c8e9e87 100755 (executable)
@@ -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) {
index fc42dc8..1557e96 100755 (executable)
@@ -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;
index c889617..ee2c89c 100755 (executable)
@@ -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;
index e06b4d4..db5ff23 100755 (executable)
@@ -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;
index 0e0a980..5775ca1 100755 (executable)
@@ -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;
index 71d6c6a..86870b5 100755 (executable)
@@ -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;
index 5784da5..7d79fcc 100755 (executable)
@@ -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;
index 9a1c6a9..aa814d8 100755 (executable)
@@ -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;
index fee6481..c38d482 100755 (executable)
@@ -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 : "<<tolang<<"\n";
   if (argc < 3) {
     di<<"Donner nom de shape.\n + option : angle en radian, sinon la valeur courante est prise"<<"\n";
index 227a079..a671b52 100755 (executable)
@@ -88,7 +88,7 @@ Matches(const Standard_Real X,
         Standard_Real& DMin)
 {
   Standard_Real DMin2 = 0.;
-  Standard_Real Xmin,Ymin,Xmax,Ymax;
+  Standard_Real Xmin = 0.,Ymin = 0.,Xmax = 0.,Ymax = 0.;
   if(!Bnd_Box2d(mybox2d).IsVoid())
   {
     Bnd_Box2d(mybox2d).Get(Xmin,Ymin,Xmax,Ymax);
index 6db19ea..779d9bb 100755 (executable)
@@ -232,7 +232,7 @@ static Standard_Boolean MinMaxSmall
     else     { nbu = bs->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);
index f2ed43b..55b8d82 100755 (executable)
@@ -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;
 
index 6230b39..6308a12 100755 (executable)
@@ -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
   
index 5f10726..56cb4c3 100755 (executable)
@@ -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);
     
index 0bd098c..4b05cca 100755 (executable)
@@ -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++) {
index 87e536d..da34026 100755 (executable)
@@ -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;
 
index a0a41c9..435cf35 100755 (executable)
@@ -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(;;) {
index 4d07225..7903053 100755 (executable)
@@ -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, 
index ca2b3b1..17313bb 100755 (executable)
@@ -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);
index a7c0480..d5ed1ba 100755 (executable)
@@ -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;
index 5ec3563..4699cef 100755 (executable)
@@ -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 = 
index bf55c99..21ccfe3 100755 (executable)
@@ -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()) 
index fbdd70e..8060bec 100755 (executable)
@@ -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
index 89e43f3..0f0c331 100755 (executable)
@@ -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; 
index a60589d..4f99de7 100755 (executable)
@@ -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();
   }
 }
-
-
-
-
-
-
-
-
-
-
-
index d6b2856..ad6285d 100755 (executable)
@@ -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;
 
index 449569c..6560566 100755 (executable)
@@ -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;
index 7019cc1..957947c 100755 (executable)
@@ -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;
index 8a78386..be06fd4 100755 (executable)
@@ -296,7 +296,7 @@ void TopOpeBRep_FFDumper::DumpDSP(const TopOpeBRep_VPointInter& VP,const TopOpeB
   cout<<" "<<G;
   
   const Handle(TopOpeBRepDS_HDataStructure)& HDS = myPFF->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 = "<<tol;
index 0063202..6de5d42 100755 (executable)
@@ -218,11 +218,8 @@ TopOpeBRepDS_Transition TopOpeBRep_FFTransitionTool::ProcessFaceTransition
   }
   else {
     Standard_Boolean Odefined = Standard_True;
-#ifdef DEB
-    TopAbs_Orientation O;
-#else
+
     TopAbs_Orientation O = TopAbs_FORWARD;
-#endif
 
     IntSurf_TypeTrans trans;
     trans = (Index == 1) ? L.TransitionOnS1() : L.TransitionOnS2();
@@ -385,7 +382,7 @@ TopOpeBRepDS_Transition TopOpeBRep_FFTransitionTool::ProcessEdgeONTransition
  TopAbs_Orientation oriE = E.Orientation();
  
  const Handle(Geom_Surface)& S = BRep_Tool::Surface(F);
- Standard_Real U,V;
+ Standard_Real U = 0.,V = 0.;
  if      (ShapeIndex == 1) VP.ParametersOnS1(U,V);
  else if (ShapeIndex == 2) VP.ParametersOnS2(U,V);
  
index 381a433..f4df2ed 100755 (executable)
@@ -309,11 +309,7 @@ Standard_Integer TopOpeBRep_FaceEdgeFiller::MakeGeometry
     (TopOpeBRep_FaceEdgeIntersector& FEINT,
      TopOpeBRepDS_DataStructure& BDS) const
 {
-#ifdef DEB
-  Standard_Integer G;
-#else
   Standard_Integer G=0;
-#endif
 
   TopoDS_Vertex V1;
   Standard_Boolean isvertexF = FEINT.IsVertex(1,V1);
index cc3ff5a..4cef11b 100755 (executable)
@@ -343,7 +343,7 @@ static Standard_Boolean FUN_findTOOF(const TopOpeBRepDS_PDataStructure pDS,
     if (!ok1) return Standard_False;
     Standard_Real f,l; FUN_tool_bounds(OOE,f,l);
     
-    TopAbs_State stb,sta;
+    TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN;
     TopOpeBRepTool_makeTransition MKT; 
     OOdone = MKT.Initialize(OOE,f,l,oopar,F,uv,factor);
     if (OOdone) OOdone = MKT.SetRest(E,paronE);
index 6371df6..22981b7 100755 (executable)
@@ -244,11 +244,8 @@ void TopOpeBRep_VPointInter::UpdateKeep()
 
   Standard_Integer SI = ShapeIndex();
 
-#ifdef DEB
-  Standard_Boolean condition; 
-#else
   Standard_Boolean condition=Standard_False; 
-#endif
+
   if      (SI == 1) condition = M_SINON(pos2);
   else if (SI == 2) condition = M_SINON(pos1);
   else if (SI == 0) condition = M_SINON(pos1) && M_SINON(pos2);
index 2e7dcc5..d999323 100755 (executable)
@@ -114,7 +114,7 @@ static Standard_Boolean FUNBREP_SameUV(const TopOpeBRep_VPointInter& VP1,
                          const Standard_Integer sind,const Standard_Real toluv)
 //-----------------------------------------------------------------------
 {
-  Standard_Real u1,v1,u2,v2;
+  Standard_Real u1 = 0.,v1 = 0.,u2 = 0.,v2 = 0.;
   if (sind == 1) {
     VP1.ParametersOnS1(u1,v1); VP2.ParametersOnS1(u2,v2);
   }
index d362fa5..32ac587 100755 (executable)
@@ -88,11 +88,8 @@ void BREP_mergePDS(const Handle(TopOpeBRepDS_HDataStructure)& HDS)
       //**!
       const TopOpeBRepDS_Point& PDS = BDS.Point(GI);
 
-#ifdef DEB      
-      Standard_Integer ivp1; TopoDS_Shape v1; Standard_Boolean newv1 = Standard_False; TopOpeBRepDS_Kind k1; Standard_Integer iv1 = 0;
-#else
       Standard_Integer ivp1; TopoDS_Shape v1; Standard_Boolean newv1 = Standard_False; TopOpeBRepDS_Kind k1=TopOpeBRepDS_UNKNOWN; Standard_Integer iv1 = 0;
-#endif
+
       ivp1 = BREP_findPDSamongIDMOVP(PDS,Mvp1);
       if (ivp1) {
        v1 = Mvp1.FindKey(ivp1);
@@ -101,11 +98,9 @@ void BREP_mergePDS(const Handle(TopOpeBRepDS_HDataStructure)& HDS)
        k1 = TopOpeBRepDS_VERTEX;
       }
       
-#ifdef DEB      
-      Standard_Integer ivp2; TopoDS_Shape v2; Standard_Boolean newv2 = Standard_False; TopOpeBRepDS_Kind k2; Standard_Integer iv2 = 0;
-#else
+
       Standard_Integer ivp2; TopoDS_Shape v2; Standard_Boolean newv2 = Standard_False; TopOpeBRepDS_Kind k2=TopOpeBRepDS_UNKNOWN; Standard_Integer iv2 = 0;
-#endif
+
       ivp2 = BREP_findPDSamongIDMOVP(PDS,Mvp2);
       if (ivp2) {
        v2 = Mvp2.FindKey(ivp2);
index a97f9d2..77e7093 100755 (executable)
@@ -96,11 +96,9 @@ TopOpeBRepDS_Transition TopOpeBRep_FacesFiller::GetEdgeTrans(const TopOpeBRep_VP
   Standard_Real paredge = VP.EdgeParameter(ShapeIndex);
 
   TopoDS_Edge OOedge;
-#ifdef DEB
-  Standard_Real OOparedge;
-#else
-  Standard_Real OOparedge=0;
-#endif
+
+  Standard_Real OOparedge = 0.;
+
   Standard_Boolean hasONedge = (VP.State(OOShapeIndex) == TopAbs_ON);
   Standard_Boolean hasOOedge = (on2edges) ? Standard_True : hasONedge;
   if ( hasOOedge ) {
index f22c633..f90f3d3 100755 (executable)
@@ -1029,7 +1029,7 @@ static Standard_Integer FUN_putInterfonDegenEd
   }
 
   Standard_Boolean setrest = Standard_False;
-  Standard_Integer mkt = 0; Standard_Real par1,par2;
+  Standard_Integer mkt = 0; Standard_Real par1 = 0.,par2 = 0.;
   if (on3) {
     TopoDS_Edge ei = (rki == 1) ? TopoDS::Edge(VP.ArcOnS1()) : TopoDS::Edge(VP.ArcOnS2());
     Standard_Real pari = (rki == 1) ? VP.ParameterOnArc1() : VP.ParameterOnArc2();
index f689e72..ccea834 100755 (executable)
@@ -493,11 +493,7 @@ Standard_Boolean TopOpeBRepBuild_Builder::Reverse(const TopAbs_State ToBuild1,co
 //=======================================================================
 TopAbs_Orientation TopOpeBRepBuild_Builder::Orient(const TopAbs_Orientation Ori,const Standard_Boolean Reverse)
 {
-#ifdef DEB
-  TopAbs_Orientation result;
-#else
   TopAbs_Orientation result=TopAbs_FORWARD;
-#endif
   switch (Reverse) {
     case Standard_True  : result = TopAbs::Complement(Ori); break;
     case Standard_False : result = Ori; break;
index 2f95c8c..ee7b00c 100755 (executable)
@@ -482,7 +482,7 @@ void TopOpeBRepBuild_BuilderON::GFillONPartsWES2(const Handle(TopOpeBRepDS_Inter
   // FRA11018 (FOR=f5,EG=e18,EsdEG=e7)           
   Standard_Boolean espONesd = Standard_False; Standard_Integer Iesd=0;// xpu150698
   if (eghassd) espONesd = FUN_ds_ONesd(BDS,GI,EspON,Iesd);// xpu150698 
-  Standard_Boolean eONsoEsd;
+  Standard_Boolean eONsoEsd = Standard_False;
   if (eghassd && (Iesd != 0)) {     
     const TopoDS_Edge& Esd = TopoDS::Edge(BDS.Shape(Iesd));
     Standard_Boolean ok = FUN_tool_curvesSO(eON,Esd,eONsoEsd);
@@ -1351,7 +1351,7 @@ void TopOpeBRepBuild_BuilderON::GFillONPartsWES2(const Handle(TopOpeBRepDS_Inter
     if (ComOfCut) {b3d=Standard_True; b2d=Standard_True;} //xpu200598
      
     gp_Vec ngFS,ngFOR;
-    Standard_Real parEG;
+    Standard_Real parEG = 0.;
     // bcl1;bcl2; tsp(f9),tspON(e7)
     Standard_Boolean sdm = FUN_ds_sdm(BDS,BDS.Shape(iFOR),BDS.Shape(iFS));
     Standard_Boolean isfafa = sdm; // such interferences are computed IN fafa case
index e6b1a58..bd8de14 100755 (executable)
@@ -195,7 +195,7 @@ void TopOpeBRepBuild_BuilderON::GFillONParts2dWES2(const Handle(TopOpeBRepDS_Int
 #ifdef DEB
     if (tFOR) cout<<"* yap6 = 1"<<endl;
 #endif
-    TopAbs_Orientation neworiE;
+    TopAbs_Orientation neworiE = TopAbs_FORWARD;
     // FF est samedomain avec FCX
     // on evalue la transition de FOR par rapport a la matiere 2d de la face FCX
     // au lieu de la transition par rapport a la matiere 3d de la face FS
@@ -211,7 +211,7 @@ void TopOpeBRepBuild_BuilderON::GFillONParts2dWES2(const Handle(TopOpeBRepDS_Int
     if (!rk1) return;
 
     TopAbs_Orientation oegFOR;
-    Standard_Boolean shareG;
+    Standard_Boolean shareG = Standard_False;
     Standard_Boolean ok = Standard_False;
     if      (EGBoundFCX) 
       ok = FUN_ds_shareG(myPB->DataStructure(),iFOR,iFCX,GI,TopoDS::Edge(EspON),shareG);
index 594f18f..d1fcb63 100755 (executable)
@@ -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;
index bed95e8..7d76bf5 100755 (executable)
@@ -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 ) {
index b5613ee..9cb3e64 100755 (executable)
@@ -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());
index b917489..0600d50 100755 (executable)
@@ -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;
index af0afce..02e6a33 100755 (executable)
@@ -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();
index 684f16e..7747fd6 100755 (executable)
@@ -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);
index e07a6ee..5e151a7 100755 (executable)
@@ -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)
index 5673566..1ee110b 100755 (executable)
@@ -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
index f4b1695..d4452dc 100755 (executable)
@@ -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); 
index 65b16d1..adc70c9 100755 (executable)
@@ -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);
index 65fc721..e81439c 100755 (executable)
@@ -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;
index 2f0bc35..33f1901 100755 (executable)
@@ -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());
index d3bef1a..a43f8d1 100755 (executable)
@@ -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<NFACES/2 ; j++, Beta += Dbeta ) {
index 9063869..ae1675a 100755 (executable)
@@ -590,8 +590,8 @@ static int visos (Draw_Interpretor& di, Standard_Integer argc, const char** argv
 
   Standard_Integer aLastInd = argc - 1;
   Standard_Boolean isChanged = Standard_False;
-  Standard_Integer aNbUIsos;
-  Standard_Integer aNbVIsos;
+  Standard_Integer aNbUIsos = 0;
+  Standard_Integer aNbVIsos = 0;
 
   if (aLastInd >= 3) {
     Standard_Boolean isIsoOnPlane = Standard_False;
index 1c808ea..444a365 100755 (executable)
@@ -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<<argv[0]<<" Syntaxe error"<<"\n"; return 1;}
@@ -3522,7 +3519,7 @@ static Standard_Integer VConnect(Draw_Interpretor& /*di*/,
   TCollection_AsciiString aName (argv[anArgIter++]);
   Handle(AIS_InteractiveObject) anOriginObject;
   TCollection_AsciiString aColorString (argv[argc-1]);
-  Standard_CString aColorName;
+  Standard_CString aColorName = "";
   Standard_Boolean hasColor = Standard_False;
   if (aColorString.Search ("color=") != -1)
   {
@@ -3702,7 +3699,7 @@ static Standard_Integer VConnectShape(Draw_Interpretor& /*di*/,
   TCollection_AsciiString aName (argv[anArgIter++]);
   Handle(AIS_InteractiveObject) anOriginShape;
   TCollection_AsciiString aColorString(argv[argc-1]);
-  Standard_CString aColorName;
+  Standard_CString aColorName = "";
   Standard_Boolean hasColor = Standard_False;
   if (aColorString.Search ("color=") != -1)
   {
index 250ced8..eacdc3d 100755 (executable)
@@ -2502,26 +2502,20 @@ static int VSetBgMode(Draw_Interpretor& di, Standard_Integer argc, const char**
     di << "use 'vinit' command before " << argv[0] << "\n";
     return 1;
   }
-
-  Aspect_FillMethod aFillType;
-  if (argc == 2)
+  Aspect_FillMethod aFillType = Aspect_FM_NONE;
+  const char* szType = argv[1];
+  if      (strcmp(szType, "NONE"    ) == 0) aFillType = Aspect_FM_NONE;
+  else if (strcmp(szType, "CENTERED") == 0) aFillType = Aspect_FM_CENTERED;
+  else if (strcmp(szType, "TILED"   ) == 0) aFillType = Aspect_FM_TILED;
+  else if (strcmp(szType, "STRETCH" ) == 0) aFillType = Aspect_FM_STRETCH;
+  else
   {
-    const char* szType = argv[1];
-    if      (strcmp(szType, "NONE"    ) == 0) aFillType = Aspect_FM_NONE;
-    else if (strcmp(szType, "CENTERED") == 0) aFillType = Aspect_FM_CENTERED;
-    else if (strcmp(szType, "TILED"   ) == 0) aFillType = Aspect_FM_TILED;
-    else if (strcmp(szType, "STRETCH" ) == 0) aFillType = Aspect_FM_STRETCH;
-    else
-    {
-      di << "Wrong fill type : " << szType << "\n";
-      di << "Must be one of CENTERED, TILED, STRETCH, NONE" << "\n";
-      return 1;
-    }
+    di << "Wrong fill type : " << szType << "\n";
+    di << "Must be one of CENTERED, TILED, STRETCH, NONE" << "\n";
+    return 1;
   }
-
   Handle(V3d_View) V3dView = ViewerTest::CurrentView();
   V3dView->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;
index 3a75172..7570325 100755 (executable)
@@ -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;
index 5681936..5b10938 100755 (executable)
@@ -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 &&
index 1cc491c..e4997ea 100755 (executable)
@@ -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
index 25e4400..6105142 100755 (executable)
@@ -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;
index 28bca44..db6a88c 100755 (executable)
@@ -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 ) {
 
index 16d2e54..e577eeb 100755 (executable)
@@ -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 ) {
 
index fba8546..2963f33 100755 (executable)
@@ -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 );