From 2f6cb3ac69e8345f982222f18247141d3d9834a6 Mon Sep 17 00:00:00 2001 From: ski Date: Mon, 21 Oct 2013 12:04:56 +0400 Subject: [PATCH] 0024274: Eliminate GCC compiler warning (wrong initialize order) Eliminated GCC compiler warning about wrong initialize order --- src/Adaptor3d/Adaptor3d_TopolTool.cxx | 2 +- src/Aspect/Aspect_ColorScale.cxx | 12 ++++++------ src/BOPDS/BOPDS_DS.cxx | 4 ++-- src/BOPTools/BOPTools_AlgoTools_1.cxx | 4 ++-- src/BOPTools/BOPTools_ConnexityBlock.hxx | 4 ++-- src/BRepFill/BRepFill_PipeShell.cxx | 2 +- src/OpenGl/OpenGl_Context.cxx | 2 +- src/OpenGl/OpenGl_PrinterContext.cxx | 7 ++++--- src/OpenGl/OpenGl_View.cxx | 6 +++--- src/QANewModTopOpe/QANewModTopOpe_Limitation.cxx | 6 +++--- src/StepToGeom/StepToGeom_MakeTrimmedCurve2d.cxx | 2 +- src/V3d/V3d_View.cxx | 4 ++-- src/Voxel/Voxel_FastConverter.cxx | 9 ++++++--- 13 files changed, 34 insertions(+), 30 deletions(-) diff --git a/src/Adaptor3d/Adaptor3d_TopolTool.cxx b/src/Adaptor3d/Adaptor3d_TopolTool.cxx index 8f7b823177..97812db92f 100755 --- a/src/Adaptor3d/Adaptor3d_TopolTool.cxx +++ b/src/Adaptor3d/Adaptor3d_TopolTool.cxx @@ -55,7 +55,7 @@ static void GetConeApexParam(const gp_Cone& C, Standard_Real& U, Standard_Real& } -Adaptor3d_TopolTool::Adaptor3d_TopolTool () : nbRestr(0),myNbSamplesU(-1),idRestr(0) +Adaptor3d_TopolTool::Adaptor3d_TopolTool () : nbRestr(0),idRestr(0),myNbSamplesU(-1) { } diff --git a/src/Aspect/Aspect_ColorScale.cxx b/src/Aspect/Aspect_ColorScale.cxx index 128f545939..75eaaa6833 100755 --- a/src/Aspect/Aspect_ColorScale.cxx +++ b/src/Aspect/Aspect_ColorScale.cxx @@ -38,19 +38,19 @@ Aspect_ColorScale::Aspect_ColorScale() : MMgt_TShared(), myMin( 0.0 ), myMax( 1.0 ), -myXPos( 0 ), -myYPos( 0 ), -myWidth( 0.2 ), myTitle( "" ), -myHeight( 1 ), myFormat( "%.4g" ), myInterval( 10 ), -myAtBorder( Standard_True ), myColorType( Aspect_TOCSD_AUTO ), -myReversed( Standard_False ), myLabelType( Aspect_TOCSD_AUTO ), +myAtBorder( Standard_True ), +myReversed( Standard_False ), myLabelPos( Aspect_TOCSP_RIGHT ), myTitlePos( Aspect_TOCSP_CENTER ), +myXPos( 0 ), +myYPos( 0 ), +myWidth( 0.2 ), +myHeight( 1 ), myTextHeight(20) { } diff --git a/src/BOPDS/BOPDS_DS.cxx b/src/BOPDS/BOPDS_DS.cxx index ab9c00be8c..61d46f0606 100644 --- a/src/BOPDS/BOPDS_DS.cxx +++ b/src/BOPDS/BOPDS_DS.cxx @@ -81,8 +81,8 @@ BOPDS_DS::BOPDS_DS() myLines(myAllocator), myMapShapeIndex(100, myAllocator), myPaveBlocksPool(myAllocator), - myFaceInfoPool(myAllocator), myMapPBCB(100, myAllocator), + myFaceInfoPool(myAllocator), myShapesSD(100, myAllocator), myInterfTB(100, myAllocator), myInterfVV(myAllocator), @@ -107,8 +107,8 @@ BOPDS_DS::BOPDS_DS(const Handle(NCollection_BaseAllocator)& theAllocator) myLines(myAllocator), myMapShapeIndex(100, myAllocator), myPaveBlocksPool(myAllocator), - myFaceInfoPool(myAllocator), myMapPBCB(100, myAllocator), + myFaceInfoPool(myAllocator), myShapesSD(100, myAllocator), myInterfTB(100, myAllocator), myInterfVV(myAllocator), diff --git a/src/BOPTools/BOPTools_AlgoTools_1.cxx b/src/BOPTools/BOPTools_AlgoTools_1.cxx index ce53efac6b..ca1b043500 100644 --- a/src/BOPTools/BOPTools_AlgoTools_1.cxx +++ b/src/BOPTools/BOPTools_AlgoTools_1.cxx @@ -224,8 +224,8 @@ void CorrectWires(const TopoDS_Face& aFx) TopoDS_Vertex aV11, aV12, aV21, aV22; TopExp::Vertices(aE, aV11, aV12); TopExp::Vertices(aE1, aV21, aV22); - if (aV11.IsSame(aV21) && aV12.IsSame(aV22) || - aV12.IsSame(aV21) && aV11.IsSame(aV22)) { + if ((aV11.IsSame(aV21) && aV12.IsSame(aV22)) || + (aV12.IsSame(aV21) && aV11.IsSame(aV22))) { continue; } } diff --git a/src/BOPTools/BOPTools_ConnexityBlock.hxx b/src/BOPTools/BOPTools_ConnexityBlock.hxx index 890c0efca9..f31cb84b0b 100644 --- a/src/BOPTools/BOPTools_ConnexityBlock.hxx +++ b/src/BOPTools/BOPTools_ConnexityBlock.hxx @@ -44,8 +44,8 @@ class BOPTools_ConnexityBlock { }; // BOPTools_ConnexityBlock(const Handle(NCollection_BaseAllocator)& theAllocator): - myRegular(Standard_True), - myAllocator(theAllocator), + myAllocator(theAllocator), + myRegular(Standard_True), myShapes(myAllocator), myLoops(myAllocator) { }; diff --git a/src/BRepFill/BRepFill_PipeShell.cxx b/src/BRepFill/BRepFill_PipeShell.cxx index 81076790b9..e9aef4dc7a 100755 --- a/src/BRepFill/BRepFill_PipeShell.cxx +++ b/src/BRepFill/BRepFill_PipeShell.cxx @@ -210,8 +210,8 @@ static Standard_Boolean IsSameOriented(const TopoDS_Shape& aFace, //======================================================================= BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) : mySpine(Spine), - myTrihedron(GeomFill_IsCorrectedFrenet), myForceApproxC1(Standard_False), + myTrihedron(GeomFill_IsCorrectedFrenet), myTransition(BRepFill_Modified), myStatus(GeomFill_PipeOk) { diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index b7f0d48471..6c836fe93b 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -97,9 +97,9 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps) myClippingState (), myGlLibHandle (NULL), myGlCore20 (NULL), + myAnisoMax (1), myMaxTexDim (1024), myMaxClipPlanes (6), - myAnisoMax (1), myGlVerMajor (0), myGlVerMinor (0), myIsFeedback (Standard_False), diff --git a/src/OpenGl/OpenGl_PrinterContext.cxx b/src/OpenGl/OpenGl_PrinterContext.cxx index 22ae43eaad..575d0d34b6 100644 --- a/src/OpenGl/OpenGl_PrinterContext.cxx +++ b/src/OpenGl/OpenGl_PrinterContext.cxx @@ -29,10 +29,11 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_PrinterContext, Standard_Transient) //======================================================================= OpenGl_PrinterContext::OpenGl_PrinterContext() : myProjTransform (0, 3, 0, 3), - myLayerViewportX (0), myScaleX (1.0f), - myLayerViewportY (0), - myScaleY (1.0f) + myScaleY (1.0f), + myLayerViewportX (0), + myLayerViewportY (0) + { // identity projection matrix Standard_Real anInitValue = 0.0; diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index ae4425d4d5..77df670eee 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -97,13 +97,13 @@ OpenGl_View::OpenGl_View (const CALL_DEF_VIEWCONTEXT &AContext) myZClip(myDefaultZClip), myExtra(myDefaultExtra), myFog(myDefaultFog), + myTrihedron(NULL), + myGraduatedTrihedron(NULL), myVisualization(AContext.Visualization), myIntShadingMethod(TEL_SM_GOURAUD), myAntiAliasing(Standard_False), myTransPers(&myDefaultTransPers), - myTrihedron(NULL), - myIsTransPers(Standard_False), - myGraduatedTrihedron(NULL) + myIsTransPers(Standard_False) { // Initialize matrices memcpy(myOrientationMatrix,myDefaultMatrix,sizeof(Tmatrix3)); diff --git a/src/QANewModTopOpe/QANewModTopOpe_Limitation.cxx b/src/QANewModTopOpe/QANewModTopOpe_Limitation.cxx index 55ce31cca8..bc1c35ac49 100755 --- a/src/QANewModTopOpe/QANewModTopOpe_Limitation.cxx +++ b/src/QANewModTopOpe/QANewModTopOpe_Limitation.cxx @@ -55,11 +55,11 @@ QANewModTopOpe_Limitation::QANewModTopOpe_Limitation(const TopoDS_Shape& theObje const TopoDS_Shape& theCutTool, const QANewModTopOpe_ModeOfLimitation theMode) : myObjectToCut(theObjectToCut), + myCut(NULL), + myCommon(NULL), myFwdIsDone(Standard_False), myRevIsDone(Standard_False), - myCut(NULL), - myMode(theMode), - myCommon(NULL) + myMode(theMode) { TopExp_Explorer anExp; diff --git a/src/StepToGeom/StepToGeom_MakeTrimmedCurve2d.cxx b/src/StepToGeom/StepToGeom_MakeTrimmedCurve2d.cxx index 0b9060968b..639ba330f8 100755 --- a/src/StepToGeom/StepToGeom_MakeTrimmedCurve2d.cxx +++ b/src/StepToGeom/StepToGeom_MakeTrimmedCurve2d.cxx @@ -65,7 +65,7 @@ Standard_Boolean StepToGeom_MakeTrimmedCurve2d::Convert (const Handle(StepGeom_T const Handle(StepGeom_HArray1OfTrimmingSelect)& theTrimSel2 = SC->Trim2(); const Standard_Integer nbSel1 = SC->NbTrim1(); const Standard_Integer nbSel2 = SC->NbTrim2(); - if ((nbSel1 == nbSel2 == 1) && + if ((nbSel1 == 1) && (nbSel2 == 1) && (theTrimSel1->Value(1).CaseMember() > 0) && (theTrimSel2->Value(1).CaseMember() > 0)) { diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index 555930e501..204b854245 100755 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -271,8 +271,8 @@ MyActiveLights(), MyViewContext (), myActiveLightsIterator(), SwitchSetFront(Standard_False), -MyTrsf (1, 4, 1, 4), // S3892 -MyProjModel(V3d_TPM_SCREEN) +MyProjModel(V3d_TPM_SCREEN), +MyTrsf (1, 4, 1, 4) // S3892 { myImmediateUpdate = Standard_False; MyView = new Visual3d_View(MyViewer->Viewer()); diff --git a/src/Voxel/Voxel_FastConverter.cxx b/src/Voxel/Voxel_FastConverter.cxx index 47a37640b9..327d7523e6 100755 --- a/src/Voxel/Voxel_FastConverter.cxx +++ b/src/Voxel/Voxel_FastConverter.cxx @@ -50,8 +50,9 @@ Voxel_FastConverter::Voxel_FastConverter(const TopoDS_Shape& shape, const Standard_Boolean useExistingTriangulation) :myShape(shape),myVoxels(&voxels), myDeflection(deflection), + myIsBool(2), myNbX(nbx),myNbY(nby),myNbZ(nbz), - myIsBool(2),myNbThreads(nbthreads), + myNbThreads(nbthreads), myNbTriangles(0), myUseExistingTriangulation(useExistingTriangulation) { @@ -68,8 +69,9 @@ Voxel_FastConverter::Voxel_FastConverter(const TopoDS_Shape& shape, const Standard_Boolean useExistingTriangulation) :myShape(shape),myVoxels(&voxels), myDeflection(deflection), + myIsBool(1), myNbX(nbx),myNbY(nby),myNbZ(nbz), - myIsBool(1),myNbThreads(nbthreads), + myNbThreads(nbthreads), myNbTriangles(0), myUseExistingTriangulation(useExistingTriangulation) { @@ -86,8 +88,9 @@ Voxel_FastConverter::Voxel_FastConverter(const TopoDS_Shape& shape, const Standard_Boolean useExistingTriangulation) :myShape(shape),myVoxels(&voxels), myDeflection(deflection), + myIsBool(0), myNbX(nbx),myNbY(nby),myNbZ(nbz), - myIsBool(0),myNbThreads(nbthreads), + myNbThreads(nbthreads), myNbTriangles(0), myUseExistingTriangulation(useExistingTriangulation) { -- 2.20.1