From 566f84411f334d86c84ec7a6988f88cf16c7b258 Mon Sep 17 00:00:00 2001 From: ski Date: Thu, 28 Nov 2013 11:13:41 +0400 Subject: [PATCH] 0024180: Eliminate CLang / GCC compiler warning -Wswitch Eliminated warnings -Wswitch shown by gcc Eliminated two new warnings about wrong initialization order Eliminated warnings about unused functions. A few more ICC warnings (type conversions) fixed --- src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx | 4 + src/Adaptor3d/Adaptor3d_TopolTool.cxx | 2 +- .../BRepExtrema_DistShapeShape.cxx | 4 + src/BRepExtrema/BRepExtrema_DistanceSS.cxx | 8 ++ src/BRepFill/BRepFill_Pipe.cxx | 2 + .../BinLDrivers_DocumentStorageDriver.cxx | 2 +- .../BinMNaming_NamedShapeDriver.cxx | 8 +- src/BinMNaming/BinMNaming_NamingDriver.cxx | 4 +- src/ChFi3d/ChFi3d_Builder_0.cxx | 2 + src/Contap/Contap_HCurve2dToolGen.gxx | 2 + src/DDocStd/DDocStd_ApplicationCommands.cxx | 37 ++++-- src/DNaming/DNaming_TransformationDriver.cxx | 6 +- src/Font/Font_FontMgr.cxx | 2 +- src/GeomAdaptor/GeomAdaptor_Surface.cxx | 108 ++++++++++++++---- src/GeomInt/GeomInt_LineConstructor.cxx | 3 + src/IntPatch/IntPatch_HInterTool.cxx | 18 ++- src/IntPatch/IntPatch_ImpPrmIntersection.cxx | 4 + src/IntPatch/IntPatch_Intersection.cxx | 4 +- src/IntPatch/IntPatch_Point.cxx | 32 ++++-- .../MNaming_NamedShapeRetrievalDriver.cxx | 2 +- .../MNaming_NamedShapeStorageDriver.cxx | 2 +- src/OSD/OSD_Error.cxx | 2 +- src/OpenGl/OpenGl_PrimitiveArray.cxx | 4 + src/PCDM/PCDM.cdl | 2 - src/QABugs/QABugs_11.cxx | 74 ++++++++---- src/QADNaming/QADNaming_IteratorsCommands.cxx | 4 +- src/QANewBRepNaming/QANewBRepNaming.cxx | 5 + src/StepFile/step.lex | 5 + src/TObj/TObj.msg | 3 - src/TObj/TObj_Application.cxx | 3 - src/TopOpeBRep/TopOpeBRep_LineInter.cxx | 4 + .../TopOpeBRepBuild_VertexInfo.cxx | 2 +- src/V3d/V3d_View.cxx | 6 +- src/Visual3d/Visual3d_ViewManager.cxx | 4 +- src/VrmlData/VrmlData_ShapeConvert.cxx | 2 + src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 34 +++--- .../XmlMNaming_NamedShapeDriver.cxx | 5 +- src/math/math_DoubleTab.gxx | 2 +- src/math/math_SingleTab.gxx | 2 +- 39 files changed, 299 insertions(+), 120 deletions(-) diff --git a/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx b/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx index 58aea74341..d9e8ca7471 100755 --- a/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx +++ b/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx @@ -32,6 +32,8 @@ Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_HSurf return (nbs < 2 ? 2 : nbs); } case GeomAbs_Torus: return 20; + default: + break; } return 10; } @@ -53,6 +55,8 @@ Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_HSurf case GeomAbs_Torus: case GeomAbs_SurfaceOfRevolution: case GeomAbs_SurfaceOfExtrusion: return 15; + default: + break; } return 10; } diff --git a/src/Adaptor3d/Adaptor3d_TopolTool.cxx b/src/Adaptor3d/Adaptor3d_TopolTool.cxx index 97812db92f..d1b2a9a650 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),idRestr(0),myNbSamplesU(-1) +Adaptor3d_TopolTool::Adaptor3d_TopolTool () : myNbSamplesU(-1),nbRestr(0),idRestr(0) { } diff --git a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx index c1889e4843..18d861b172 100755 --- a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx +++ b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx @@ -461,6 +461,8 @@ void BRepExtrema_DistShapeShape::Dump(Standard_OStream& o) const switch (SupportTypeShape1(i)) { + case BRepExtrema_IsVertex: + break; case BRepExtrema_IsOnEdge: ParOnEdgeS1(i,r1); o << "parameter on the first edge : t= " << r1 << endl; @@ -472,6 +474,8 @@ void BRepExtrema_DistShapeShape::Dump(Standard_OStream& o) const } switch (SupportTypeShape2(i)) { + case BRepExtrema_IsVertex: + break; case BRepExtrema_IsOnEdge: ParOnEdgeS2(i,r1); o << "parameter on the second edge : t=" << r1 << endl; diff --git a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx index e39c17c03b..3abc59b045 100755 --- a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx +++ b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx @@ -545,6 +545,8 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& S1, const TopoDS_Shape& Perform( V1, F2, B1, B2 ); break; } + default: + break; } break; } @@ -585,6 +587,8 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& S1, const TopoDS_Shape& Perform( E1, F2, B1, B2 ); break; } + default: + break; } break; } @@ -617,9 +621,13 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& S1, const TopoDS_Shape& Perform( F1, F2, B1, B2 ); break; } + default: + break; } break; } + default: + break; } } diff --git a/src/BRepFill/BRepFill_Pipe.cxx b/src/BRepFill/BRepFill_Pipe.cxx index 2d4c25f5f5..46e6a2409c 100755 --- a/src/BRepFill/BRepFill_Pipe.cxx +++ b/src/BRepFill/BRepFill_Pipe.cxx @@ -142,6 +142,8 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine, case GeomFill_IsDiscreteTrihedron: TLaw = new GeomFill_DiscreteTrihedron(); break; + default: + break; } Handle(GeomFill_CurveAndTrihedron) Loc = new (GeomFill_CurveAndTrihedron) (TLaw); diff --git a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx index 10f4396a66..d280bb17d0 100755 --- a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx @@ -180,7 +180,7 @@ void BinLDrivers_DocumentStorageDriver::Write WriteMessage (aStr + theFileName); #endif SetIsError(Standard_True); - SetStoreStatus(PCDM_SS_DiskWritingFailure); + SetStoreStatus(PCDM_SS_WriteFailure); } } diff --git a/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx b/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx index 2e86336e60..051861a79c 100755 --- a/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx +++ b/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx @@ -42,7 +42,7 @@ static Standard_Character EvolutionToChar(const TNaming_Evolution theEvol) case TNaming_MODIFY : return 'M'; case TNaming_DELETE : return 'D'; case TNaming_SELECTED : return 'S'; - // case TNaming_REPLACE : return 'R'; + case TNaming_REPLACE : return 'M'; // for compatibility case TNaming_REPLACE : return 'R'; default: Standard_DomainError::Raise("TNaming_Evolution:: Evolution Unknown"); } @@ -211,9 +211,9 @@ Standard_Boolean BinMNaming_NamedShapeDriver::Paste case TNaming_SELECTED : aBuilder.Select(aNewShape, anOldShape); break; - // case TNaming_REPLACE : - // aBuilder.Replace(anOldShape, aNewShape); - // break; + case TNaming_REPLACE : + aBuilder.Modify(anOldShape, aNewShape); // for compatibility aBuilder.Replace(anOldShape, aNewShape); + break; default : Standard_DomainError::Raise("TNaming_Evolution:: Evolution Unknown"); } diff --git a/src/BinMNaming/BinMNaming_NamingDriver.cxx b/src/BinMNaming/BinMNaming_NamingDriver.cxx index c61a156373..18b2fee731 100755 --- a/src/BinMNaming/BinMNaming_NamingDriver.cxx +++ b/src/BinMNaming/BinMNaming_NamingDriver.cxx @@ -38,8 +38,10 @@ #include #include #include + #define NULL_ENTRY "0:0" -#define OBSOLETE_NUM sizeof(Standard_Integer) +#define OBSOLETE_NUM (int)sizeof(Standard_Integer) + //======================================================================= // 'Z' - is reserved for: forfidden to use //======================================================================= diff --git a/src/ChFi3d/ChFi3d_Builder_0.cxx b/src/ChFi3d/ChFi3d_Builder_0.cxx index d303c66bea..2b5e9b0b91 100755 --- a/src/ChFi3d/ChFi3d_Builder_0.cxx +++ b/src/ChFi3d/ChFi3d_Builder_0.cxx @@ -1765,6 +1765,8 @@ TopAbs_Orientation ChFi3d_TrsfTrans(const IntSurf_TypeTrans T1) switch (T1) { case IntSurf_In: return TopAbs_FORWARD; case IntSurf_Out: return TopAbs_REVERSED; + default: + break; } return TopAbs_INTERNAL; } diff --git a/src/Contap/Contap_HCurve2dToolGen.gxx b/src/Contap/Contap_HCurve2dToolGen.gxx index 03f0276a5d..579de55a97 100755 --- a/src/Contap/Contap_HCurve2dToolGen.gxx +++ b/src/Contap/Contap_HCurve2dToolGen.gxx @@ -48,6 +48,8 @@ Standard_Integer Contap_HCurve2dToolGen::NbSamples (const CurveGen& C, nbs/= U1-U0; if(nbs < 2.0) nbs = 2.; break; + default: + break; } if (nbs>50.) nbs = 50.; diff --git a/src/DDocStd/DDocStd_ApplicationCommands.cxx b/src/DDocStd/DDocStd_ApplicationCommands.cxx index 593fde7e11..00c9488e26 100755 --- a/src/DDocStd/DDocStd_ApplicationCommands.cxx +++ b/src/DDocStd/DDocStd_ApplicationCommands.cxx @@ -261,17 +261,32 @@ static Standard_Integer DDocStd_SaveAs (Draw_Interpretor& di, PCDM_StoreStatus theStatus = A->SaveAs(D,path); if (theStatus != PCDM_SS_OK ) { switch ( theStatus ) { - case PCDM_SS_DriverFailure: { - di << " could not store , no driver found to make it " <<"\n" ; - break ; - } - case PCDM_SS_WriteFailure: { - di << " Write access failure " << "\n" ; - break; - } - case PCDM_SS_Failure: { - di << " Write failure " << "\n" ; - } + case PCDM_SS_DriverFailure: { + di << "Error saving document: Could not store , no driver found to make it" << "\n"; + break ; + } + case PCDM_SS_WriteFailure: { + di << "Error saving document: Write access failure" << "\n"; + break; + } + case PCDM_SS_Failure: { + di << "Error saving document: Write failure" << "\n" ; + break; + } + case PCDM_SS_Doc_IsNull: { + di << "Error saving document: No document to save" << "\n"; + break ; + } + case PCDM_SS_No_Obj: { + di << "Error saving document: No objects written" << "\n"; + break; + } + case PCDM_SS_Info_Section_Error: { + di << "Error saving document: Write info section failure" << "\n" ; + break; + } + default: + break; } return 1; } else { diff --git a/src/DNaming/DNaming_TransformationDriver.cxx b/src/DNaming/DNaming_TransformationDriver.cxx index dcef94dd67..53497dd563 100644 --- a/src/DNaming/DNaming_TransformationDriver.cxx +++ b/src/DNaming/DNaming_TransformationDriver.cxx @@ -320,6 +320,7 @@ static void CollectShapes(const TopoDS_Shape& SSh, TopoDS_Compound& C, } break; case TopAbs_VERTEX: + { const Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(SSh, theLab); if(!aNS.IsNull()) if(SMap.Add(SSh)) { @@ -327,8 +328,11 @@ static void CollectShapes(const TopoDS_Shape& SSh, TopoDS_Compound& C, // if(isPrimitive) // TagMap.Bind(SSh, aNS->Label().Tag()); } + } + break; + default: break; - } + } } //======================================================================= diff --git a/src/Font/Font_FontMgr.cxx b/src/Font/Font_FontMgr.cxx index 4f64e23561..59467c8194 100644 --- a/src/Font/Font_FontMgr.cxx +++ b/src/Font/Font_FontMgr.cxx @@ -69,7 +69,7 @@ static const Font_FontMgr_FontAliasMapNode Font_FontMgr_MapOfFontsAliases[] = }; -#define NUM_FONT_ENTRIES (sizeof(Font_FontMgr_MapOfFontsAliases)/sizeof(Font_FontMgr_FontAliasMapNode)) +#define NUM_FONT_ENTRIES (int)(sizeof(Font_FontMgr_MapOfFontsAliases)/sizeof(Font_FontMgr_FontAliasMapNode)) #if (defined(_WIN32) || defined(__WIN32__)) diff --git a/src/GeomAdaptor/GeomAdaptor_Surface.cxx b/src/GeomAdaptor/GeomAdaptor_Surface.cxx index 80bf9a6774..4a09068d9a 100755 --- a/src/GeomAdaptor/GeomAdaptor_Surface.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Surface.cxx @@ -187,24 +187,36 @@ GeomAbs_Shape GeomAdaptor_Surface::UContinuity() const return LocalContinuity(myBspl->UDegree(), myBspl->NbUKnots(), TK, TM, myUFirst, myULast, IsUPeriodic()); } - case GeomAbs_OffsetSurface: + case GeomAbs_OffsetSurface: { switch(BasisSurface()->UContinuity()) { - case GeomAbs_CN : return GeomAbs_CN; - case GeomAbs_C2 : return GeomAbs_C1; - case GeomAbs_C1 : return GeomAbs_C0; + case GeomAbs_CN : + case GeomAbs_C3 : return GeomAbs_CN; + case GeomAbs_G2 : + case GeomAbs_C2 : return GeomAbs_C1; + case GeomAbs_G1 : + case GeomAbs_C1 : return GeomAbs_C0; + case GeomAbs_C0 : break; } Standard_NoSuchObject::Raise("GeomAdaptor_Surface::UContinuity"); - break; + break; } - case GeomAbs_SurfaceOfExtrusion: + case GeomAbs_SurfaceOfExtrusion: { GeomAdaptor_Curve GC ((*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))->BasisCurve(),myUFirst,myULast); return GC.Continuity(); } - case GeomAbs_OtherSurface: Standard_NoSuchObject::Raise("GeomAdaptor_Surface::UContinuity"); + case GeomAbs_OtherSurface: + Standard_NoSuchObject::Raise("GeomAdaptor_Surface::UContinuity"); + case GeomAbs_Plane: + case GeomAbs_Cylinder: + case GeomAbs_Cone: + case GeomAbs_Sphere: + case GeomAbs_Torus: + case GeomAbs_BezierSurface: + case GeomAbs_SurfaceOfRevolution: break; } return GeomAbs_CN; } @@ -228,24 +240,36 @@ GeomAbs_Shape GeomAdaptor_Surface::VContinuity() const return LocalContinuity(myBspl->VDegree(), myBspl->NbVKnots(), TK, TM, myVFirst, myVLast, IsVPeriodic()); } - case GeomAbs_OffsetSurface: + case GeomAbs_OffsetSurface: { switch(BasisSurface()->VContinuity()) { - case GeomAbs_CN : return GeomAbs_CN; - case GeomAbs_C2 : return GeomAbs_C1; - case GeomAbs_C1 : return GeomAbs_C0; + case GeomAbs_CN : + case GeomAbs_C3 : return GeomAbs_CN; + case GeomAbs_G2 : + case GeomAbs_C2 : return GeomAbs_C1; + case GeomAbs_G1 : + case GeomAbs_C1 : return GeomAbs_C0; + case GeomAbs_C0 : break; } Standard_NoSuchObject::Raise("GeomAdaptor_Surface::VContinuity"); break; } - case GeomAbs_SurfaceOfRevolution: + case GeomAbs_SurfaceOfRevolution: { GeomAdaptor_Curve GC ((*((Handle(Geom_SurfaceOfRevolution)*)&mySurface))->BasisCurve(),myVFirst,myVLast); return GC.Continuity(); } - case GeomAbs_OtherSurface: Standard_NoSuchObject::Raise("GeomAdaptor_Surface::VContinuity"); + case GeomAbs_OtherSurface: + Standard_NoSuchObject::Raise("GeomAdaptor_Surface::VContinuity"); + case GeomAbs_Plane: + case GeomAbs_Cylinder: + case GeomAbs_Cone: + case GeomAbs_Sphere: + case GeomAbs_Torus: + case GeomAbs_BezierSurface: + case GeomAbs_SurfaceOfExtrusion: break; } return GeomAbs_CN; } @@ -265,7 +289,7 @@ Standard_Integer GeomAdaptor_Surface::NbUIntervals(const GeomAbs_Shape S) const (myBspl->VIso(myBspl->VKnot(myBspl->FirstVKnotIndex())),myUFirst,myULast); return myBasisCurve.NbIntervals(S); } - case GeomAbs_SurfaceOfExtrusion: + case GeomAbs_SurfaceOfExtrusion: { GeomAdaptor_Curve myBasisCurve ((*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))->BasisCurve(),myUFirst,myULast); @@ -273,7 +297,7 @@ Standard_Integer GeomAdaptor_Surface::NbUIntervals(const GeomAbs_Shape S) const return myBasisCurve.NbIntervals(S); break; } - case GeomAbs_OffsetSurface: + case GeomAbs_OffsetSurface: { GeomAbs_Shape BaseS = GeomAbs_CN; switch(S) @@ -283,10 +307,20 @@ Standard_Integer GeomAdaptor_Surface::NbUIntervals(const GeomAbs_Shape S) const case GeomAbs_C0: BaseS = GeomAbs_C1; break; case GeomAbs_C1: BaseS = GeomAbs_C2; break; case GeomAbs_C2: BaseS = GeomAbs_C3; break; + case GeomAbs_C3: + case GeomAbs_CN: break; } GeomAdaptor_Surface Sur((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface()); return Sur.NbUIntervals(BaseS); } + case GeomAbs_Plane: + case GeomAbs_Cylinder: + case GeomAbs_Cone: + case GeomAbs_Sphere: + case GeomAbs_Torus: + case GeomAbs_BezierSurface: + case GeomAbs_OtherSurface: + case GeomAbs_SurfaceOfRevolution: break; } return 1; } @@ -306,7 +340,7 @@ Standard_Integer GeomAdaptor_Surface::NbVIntervals(const GeomAbs_Shape S) const (myBspl->UIso(myBspl->UKnot(myBspl->FirstUKnotIndex())),myVFirst,myVLast); return myBasisCurve.NbIntervals(S); } - case GeomAbs_SurfaceOfRevolution: + case GeomAbs_SurfaceOfRevolution: { GeomAdaptor_Curve myBasisCurve ((*((Handle(Geom_SurfaceOfRevolution)*)&mySurface))->BasisCurve(),myVFirst,myVLast); @@ -314,7 +348,7 @@ Standard_Integer GeomAdaptor_Surface::NbVIntervals(const GeomAbs_Shape S) const return myBasisCurve.NbIntervals(S); break; } - case GeomAbs_OffsetSurface: + case GeomAbs_OffsetSurface: { GeomAbs_Shape BaseS = GeomAbs_CN; switch(S) @@ -324,10 +358,20 @@ Standard_Integer GeomAdaptor_Surface::NbVIntervals(const GeomAbs_Shape S) const case GeomAbs_C0: BaseS = GeomAbs_C1; break; case GeomAbs_C1: BaseS = GeomAbs_C2; break; case GeomAbs_C2: BaseS = GeomAbs_C3; break; + case GeomAbs_C3: + case GeomAbs_CN: break; } GeomAdaptor_Surface Sur((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface()); return Sur.NbVIntervals(BaseS); - } + } + case GeomAbs_Plane: + case GeomAbs_Cylinder: + case GeomAbs_Cone: + case GeomAbs_Sphere: + case GeomAbs_Torus: + case GeomAbs_BezierSurface: + case GeomAbs_OtherSurface: + case GeomAbs_SurfaceOfExtrusion: break; } return 1; } @@ -351,7 +395,7 @@ void GeomAdaptor_Surface::UIntervals(TColStd_Array1OfReal& T, const GeomAbs_Shap myBasisCurve.Intervals(T,S); break; } - case GeomAbs_SurfaceOfExtrusion: + case GeomAbs_SurfaceOfExtrusion: { GeomAdaptor_Curve myBasisCurve ((*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))->BasisCurve(),myUFirst,myULast); @@ -362,7 +406,7 @@ void GeomAdaptor_Surface::UIntervals(TColStd_Array1OfReal& T, const GeomAbs_Shap } break; } - case GeomAbs_OffsetSurface: + case GeomAbs_OffsetSurface: { GeomAbs_Shape BaseS = GeomAbs_CN; switch(S) @@ -372,11 +416,21 @@ void GeomAdaptor_Surface::UIntervals(TColStd_Array1OfReal& T, const GeomAbs_Shap case GeomAbs_C0: BaseS = GeomAbs_C1; break; case GeomAbs_C1: BaseS = GeomAbs_C2; break; case GeomAbs_C2: BaseS = GeomAbs_C3; break; + case GeomAbs_C3: + case GeomAbs_CN: break; } GeomAdaptor_Surface Sur((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface()); myNbUIntervals = Sur.NbUIntervals(BaseS); Sur.UIntervals(T, BaseS); } + case GeomAbs_Plane: + case GeomAbs_Cylinder: + case GeomAbs_Cone: + case GeomAbs_Sphere: + case GeomAbs_Torus: + case GeomAbs_BezierSurface: + case GeomAbs_OtherSurface: + case GeomAbs_SurfaceOfRevolution: break; } T(T.Lower()) = myUFirst; @@ -402,7 +456,7 @@ void GeomAdaptor_Surface::VIntervals(TColStd_Array1OfReal& T, const GeomAbs_Shap myBasisCurve.Intervals(T,S); break; } - case GeomAbs_SurfaceOfRevolution: + case GeomAbs_SurfaceOfRevolution: { GeomAdaptor_Curve myBasisCurve ((*((Handle(Geom_SurfaceOfRevolution)*)&mySurface))->BasisCurve(),myVFirst,myVLast); @@ -413,7 +467,7 @@ void GeomAdaptor_Surface::VIntervals(TColStd_Array1OfReal& T, const GeomAbs_Shap } break; } - case GeomAbs_OffsetSurface: + case GeomAbs_OffsetSurface: { GeomAbs_Shape BaseS = GeomAbs_CN; switch(S) @@ -423,11 +477,21 @@ void GeomAdaptor_Surface::VIntervals(TColStd_Array1OfReal& T, const GeomAbs_Shap case GeomAbs_C0: BaseS = GeomAbs_C1; break; case GeomAbs_C1: BaseS = GeomAbs_C2; break; case GeomAbs_C2: BaseS = GeomAbs_C3; break; + case GeomAbs_C3: + case GeomAbs_CN: break; } GeomAdaptor_Surface Sur((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface()); myNbVIntervals = Sur.NbVIntervals(BaseS); Sur.VIntervals(T, BaseS); } + case GeomAbs_Plane: + case GeomAbs_Cylinder: + case GeomAbs_Cone: + case GeomAbs_Sphere: + case GeomAbs_Torus: + case GeomAbs_BezierSurface: + case GeomAbs_OtherSurface: + case GeomAbs_SurfaceOfExtrusion: break; } T(T.Lower()) = myVFirst; diff --git a/src/GeomInt/GeomInt_LineConstructor.cxx b/src/GeomInt/GeomInt_LineConstructor.cxx index 6bf5a63326..0d98d52f1f 100755 --- a/src/GeomInt/GeomInt_LineConstructor.cxx +++ b/src/GeomInt/GeomInt_LineConstructor.cxx @@ -260,6 +260,9 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L) case IntPatch_Ellipse: Pmid = ElCLib::Value(pmid,GLine->Ellipse()); break; case IntPatch_Hyperbola: Pmid = ElCLib::Value(pmid,GLine->Hyperbola()); break; case IntPatch_Parabola: Pmid = ElCLib::Value(pmid,GLine->Parabola()); break; + case IntPatch_Analytic: + case IntPatch_Walking: + case IntPatch_Restriction: break; // cases Analytic, Walking and Restriction are handled above } Parameters(myHS1,myHS2,Pmid,u1,v1,u2,v2); Recadre(myHS1,myHS2,u1,v1,u2,v2); diff --git a/src/IntPatch/IntPatch_HInterTool.cxx b/src/IntPatch/IntPatch_HInterTool.cxx index fbb27d66ff..9ec56b6560 100755 --- a/src/IntPatch/IntPatch_HInterTool.cxx +++ b/src/IntPatch/IntPatch_HInterTool.cxx @@ -64,6 +64,9 @@ Standard_Integer IntPatch_HInterTool::NbSamplesV (const Handle(Adaptor3d_HSurfac case GeomAbs_Torus: case GeomAbs_SurfaceOfRevolution: case GeomAbs_SurfaceOfExtrusion: return 15; + + case GeomAbs_OffsetSurface: + case GeomAbs_OtherSurface: return 10; } return 10; } @@ -82,13 +85,16 @@ Standard_Integer IntPatch_HInterTool::NbSamplesU (const Handle(Adaptor3d_HSurfac if (!S->IsURational()) nbs *= 2; if (nbs < 4) nbs = 4; return nbs; - } + } case GeomAbs_Torus: return 20; - //case GeomAbs_Cylinder: - //case GeomAbs_Cone: - //case GeomAbs_Sphere: - //case GeomAbs_SurfaceOfRevolution: - //case GeomAbs_SurfaceOfExtrusion: return 10; + + case GeomAbs_Cylinder: + case GeomAbs_Cone: + case GeomAbs_Sphere: + case GeomAbs_SurfaceOfRevolution: + case GeomAbs_SurfaceOfExtrusion: + case GeomAbs_OffsetSurface: + case GeomAbs_OtherSurface: return 10; } return 10; } diff --git a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx index 56cb016ec8..8f4fbb2f65 100755 --- a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx @@ -376,6 +376,8 @@ void Recadre(const Standard_Boolean , case GeomAbs_Sphere: while(U1<(U1p-1.5*M_PI)) U1+=M_PI+M_PI; while(U1>(U1p+1.5*M_PI)) U1-=M_PI+M_PI; + default: + break; } switch(typeS2) { @@ -387,6 +389,8 @@ void Recadre(const Standard_Boolean , case GeomAbs_Sphere: while(U2<(U2p-1.5*M_PI)) U2+=M_PI+M_PI; while(U2>(U2p+1.5*M_PI)) U2-=M_PI+M_PI; + default: + break; } pt.SetParameters(U1,V1,U2,V2); } diff --git a/src/IntPatch/IntPatch_Intersection.cxx b/src/IntPatch/IntPatch_Intersection.cxx index a6e156c507..ef5cf0f43c 100755 --- a/src/IntPatch/IntPatch_Intersection.cxx +++ b/src/IntPatch/IntPatch_Intersection.cxx @@ -628,6 +628,8 @@ static void FUN_NewFirstLast(const GeomAbs_CurveType& ga_ct, } break; } + default: + break; } } //================================================================================ @@ -1477,7 +1479,7 @@ void IntPatch_Intersection::Dump(const Standard_Integer , nbR2++; } - printf("\nDUMP_INT: ----empt:%2d tgte:%2d oppo:%2d ---------------------------------",empt,tgte,empt); + printf("\nDUMP_INT: ----empt:%2ud tgte:%2ud oppo:%2ud ---------------------------------",empt,tgte,empt); Standard_Integer i,j,nbr1,nbr2,nbgl,nbgc,nbge,nbgp,nbgh,nbl,nbr,nbg,nbw,nba; nbl=nbr=nbg=nbw=nba=nbgl=nbge=nbr1=nbr2=nbgc=nbgp=nbgh=0; nbl=NbLines(); diff --git a/src/IntPatch/IntPatch_Point.cxx b/src/IntPatch/IntPatch_Point.cxx index 20dded47ab..a293c3d7af 100755 --- a/src/IntPatch/IntPatch_Point.cxx +++ b/src/IntPatch/IntPatch_Point.cxx @@ -82,16 +82,20 @@ void IntPatch_Point::ReverseTransition() IntSurf_Transition TLine; switch (traline1.TransitionType()) { - case IntSurf_In: TLine.SetValue(Standard_False,IntSurf_Out); break; - case IntSurf_Out: TLine.SetValue(Standard_False,IntSurf_In); break; - } + case IntSurf_In: TLine.SetValue(Standard_False,IntSurf_Out); break; + case IntSurf_Out: TLine.SetValue(Standard_False,IntSurf_In); break; + default: + break; + } traline1=TLine; IntSurf_Transition TArc; switch (tra1.TransitionType()) { - case IntSurf_In: TArc.SetValue(Standard_False,IntSurf_Out); break; - case IntSurf_Out: TArc.SetValue(Standard_False,IntSurf_In); break; - } + case IntSurf_In: TArc.SetValue(Standard_False,IntSurf_Out); break; + case IntSurf_Out: TArc.SetValue(Standard_False,IntSurf_In); break; + default: + break; + } tra1=TArc; } if(onS2) @@ -99,16 +103,20 @@ void IntPatch_Point::ReverseTransition() IntSurf_Transition TLine; switch (traline2.TransitionType()) { - case IntSurf_In: TLine.SetValue(Standard_False,IntSurf_Out); break; - case IntSurf_Out: TLine.SetValue(Standard_False,IntSurf_In); break; - } + case IntSurf_In: TLine.SetValue(Standard_False,IntSurf_Out); break; + case IntSurf_Out: TLine.SetValue(Standard_False,IntSurf_In); break; + default: + break; + } traline2=TLine; IntSurf_Transition TArc; switch (tra2.TransitionType()) { - case IntSurf_In: TArc.SetValue(Standard_False,IntSurf_Out); break; - case IntSurf_Out: TArc.SetValue(Standard_False,IntSurf_In); break; - } + case IntSurf_In: TArc.SetValue(Standard_False,IntSurf_Out); break; + case IntSurf_Out: TArc.SetValue(Standard_False,IntSurf_In); break; + default: + break; + } tra2=TArc; } } diff --git a/src/MNaming/MNaming_NamedShapeRetrievalDriver.cxx b/src/MNaming/MNaming_NamedShapeRetrievalDriver.cxx index 4cb3628f53..24e60fb80c 100755 --- a/src/MNaming/MNaming_NamedShapeRetrievalDriver.cxx +++ b/src/MNaming/MNaming_NamedShapeRetrievalDriver.cxx @@ -149,7 +149,7 @@ void MNaming_NamedShapeRetrievalDriver::Paste ( case TNaming_SELECTED : { Bld.Select(NewShape, OldShape); break; } - case TNaming_REPLACE :{ + case TNaming_REPLACE : { //Bld.Replace(OldShape,NewShape); break; Bld.Modify(OldShape,NewShape); break;// for compatibility only } diff --git a/src/MNaming/MNaming_NamedShapeStorageDriver.cxx b/src/MNaming/MNaming_NamedShapeStorageDriver.cxx index 84ee517c61..9520773021 100755 --- a/src/MNaming/MNaming_NamedShapeStorageDriver.cxx +++ b/src/MNaming/MNaming_NamedShapeStorageDriver.cxx @@ -158,7 +158,7 @@ Standard_Integer EvolutionInt(const TNaming_Evolution i) case TNaming_MODIFY : return 2; case TNaming_DELETE : return 3; case TNaming_SELECTED : return 4; - //case TNaming_REPLACE : return 5; + case TNaming_REPLACE : return 2; //case TNaming_REPLACE : return 5; for compatibility default: Standard_DomainError::Raise("TNaming_Evolution; enum term unknown"); } diff --git a/src/OSD/OSD_Error.cxx b/src/OSD/OSD_Error.cxx index 8a7f006d7e..f8e8c0b387 100755 --- a/src/OSD/OSD_Error.cxx +++ b/src/OSD/OSD_Error.cxx @@ -604,7 +604,7 @@ static ERROR_TABLE fileErrorTable[] = { }; -#define FILE_ERR_TABLE_SIZE ( sizeof ( fileErrorTable ) / sizeof ( fileErrorTable[ 0 ] ) ) +#define FILE_ERR_TABLE_SIZE (int)(sizeof(fileErrorTable) / sizeof(fileErrorTable[0])) static ERROR_TABLE fileNodeErrorTable[] = { diff --git a/src/OpenGl/OpenGl_PrimitiveArray.cxx b/src/OpenGl/OpenGl_PrimitiveArray.cxx index 0a5b0b2fc4..cf9d973af3 100755 --- a/src/OpenGl/OpenGl_PrimitiveArray.cxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.cxx @@ -207,6 +207,8 @@ void OpenGl_PrimitiveArray::DrawArray (Tint theLightingModel, case TelTriangleFansArrayType: glColor3fv (theInteriorColour->rgb); break; + case TelUnknownArrayType: + break; } // Temporarily disable environment mapping @@ -687,6 +689,8 @@ OpenGl_PrimitiveArray::OpenGl_PrimitiveArray (CALL_DEF_PARRAY* thePArray) case TelTriangleFansArrayType: myDrawMode = GL_TRIANGLE_FAN; break; + case TelUnknownArrayType: + break; } } diff --git a/src/PCDM/PCDM.cdl b/src/PCDM/PCDM.cdl index f9b3609e6a..f6703bf2ec 100755 --- a/src/PCDM/PCDM.cdl +++ b/src/PCDM/PCDM.cdl @@ -58,8 +58,6 @@ is SS_DriverFailure, SS_WriteFailure, SS_Failure, - SS_DiskWritingFailure, - SS_UserRightsFailure, SS_Doc_IsNull, SS_No_Obj, SS_Info_Section_Error diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index c3c0a644b7..ee64739f85 100755 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -779,17 +779,32 @@ static Standard_Integer OCC381_Save (Draw_Interpretor& di, Standard_Integer nb, PCDM_StoreStatus theStatus = A->Save(D, theStatusMessage); if (theStatus != PCDM_SS_OK ) { switch ( theStatus ) { - case PCDM_SS_DriverFailure: { - di << " Could not store , no driver found to make it " <<"\n" ; - break ; - } - case PCDM_SS_WriteFailure: { - di << " Write access failure " << "\n" ; - break; - } - case PCDM_SS_Failure: { - di << " Write failure " << "\n" ; - } + case PCDM_SS_DriverFailure: { + di << "Error saving document: Could not store , no driver found to make it" << "\n"; + break ; + } + case PCDM_SS_WriteFailure: { + di << "Error saving document: Write access failure" << "\n"; + break; + } + case PCDM_SS_Failure: { + di << "Error saving document: Write failure" << "\n" ; + break; + } + case PCDM_SS_Doc_IsNull: { + di << "Error saving document: No document to save" << "\n"; + break ; + } + case PCDM_SS_No_Obj: { + di << "Error saving document: No objects written" << "\n"; + break; + } + case PCDM_SS_Info_Section_Error: { + di << "Error saving document: Write info section failure" << "\n" ; + break; + } + default: + break; } return 1; } @@ -814,17 +829,32 @@ static Standard_Integer OCC381_SaveAs (Draw_Interpretor& di, Standard_Integer nb PCDM_StoreStatus theStatus = A->SaveAs(D,path, theStatusMessage); if (theStatus != PCDM_SS_OK ) { switch ( theStatus ) { - case PCDM_SS_DriverFailure: { - di << " Could not store , no driver found to make it " <<"\n" ; - break ; - } - case PCDM_SS_WriteFailure: { - di << " Write access failure " << "\n" ; - break; - } - case PCDM_SS_Failure: { - di << " Write failure " << "\n" ; - } + case PCDM_SS_DriverFailure: { + di << "Error saving document: Could not store , no driver found to make it" << "\n"; + break ; + } + case PCDM_SS_WriteFailure: { + di << "Error saving document: Write access failure" << "\n"; + break; + } + case PCDM_SS_Failure: { + di << "Error saving document: Write failure" << "\n" ; + break; + } + case PCDM_SS_Doc_IsNull: { + di << "Error saving document: No document to save" << "\n"; + break ; + } + case PCDM_SS_No_Obj: { + di << "Error saving document: No objects written" << "\n"; + break; + } + case PCDM_SS_Info_Section_Error: { + di << "Error saving document: Write info section failure" << "\n" ; + break; + } + default: + break; } return 1; } diff --git a/src/QADNaming/QADNaming_IteratorsCommands.cxx b/src/QADNaming/QADNaming_IteratorsCommands.cxx index 785f967102..fc541d64eb 100755 --- a/src/QADNaming/QADNaming_IteratorsCommands.cxx +++ b/src/QADNaming/QADNaming_IteratorsCommands.cxx @@ -50,8 +50,8 @@ static const char* EvolutionString(TNaming_Evolution theEvolution) { return "DELETE"; case TNaming_SELECTED : return "SELECTED"; -// case TNaming_REPLACE : -// return "REPLACE"; + case TNaming_REPLACE : + return "MODIFY"; } return "UNKNOWN_Evolution"; } diff --git a/src/QANewBRepNaming/QANewBRepNaming.cxx b/src/QANewBRepNaming/QANewBRepNaming.cxx index 7bfabc2cb3..1afe10ddad 100755 --- a/src/QANewBRepNaming/QANewBRepNaming.cxx +++ b/src/QANewBRepNaming/QANewBRepNaming.cxx @@ -88,6 +88,11 @@ void QANewBRepNaming::LoadNamedShape (TNaming_Builder& theBuilder, theBuilder.Modify(theOS, theNS); break; } + case TNaming_REPLACE : + { + theBuilder.Modify(theOS, theNS); + break; + } // for compatibility // case TNaming_REPLACE : // { // theBuilder.Replace(theOS, theNS); diff --git a/src/StepFile/step.lex b/src/StepFile/step.lex index 89d6b67083..565c3a80f8 100755 --- a/src/StepFile/step.lex +++ b/src/StepFile/step.lex @@ -50,6 +50,11 @@ void rec_typarg(int argtype); #pragma warning(disable:4131 4244 4273 4267 4127) #endif +// disable GCC warnings in flex code +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wunused-function" +#endif + %} %% " " {;} diff --git a/src/TObj/TObj.msg b/src/TObj/TObj.msg index a4546ec3e7..c59637312f 100755 --- a/src/TObj/TObj.msg +++ b/src/TObj/TObj.msg @@ -56,9 +56,6 @@ .TObj_Appl_SFailure Error saving document %s : general failure of persistence driver -.TObj_Appl_SDiskWritingFailure - Error saving document %s : possibly the disk is full or other disk write problem occurred - .TObj_Appl_SDocIsNull Error saving document %s : No document to save diff --git a/src/TObj/TObj_Application.cxx b/src/TObj/TObj_Application.cxx index 7cec227645..313e102942 100755 --- a/src/TObj/TObj_Application.cxx +++ b/src/TObj/TObj_Application.cxx @@ -103,9 +103,6 @@ Standard_Boolean TObj_Application::SaveDocument case PCDM_SS_Failure: ErrorMessage (Message_Msg("TObj_Appl_SFailure") << aPath); break; - case PCDM_SS_DiskWritingFailure: - ErrorMessage (Message_Msg("TObj_Appl_SDiskWritingFailure") << aPath); - break; case PCDM_SS_Doc_IsNull: ErrorMessage (Message_Msg("TObj_Appl_SDocIsNull") << aPath); break; diff --git a/src/TopOpeBRep/TopOpeBRep_LineInter.cxx b/src/TopOpeBRep/TopOpeBRep_LineInter.cxx index a1d228a634..5d457cea14 100755 --- a/src/TopOpeBRep/TopOpeBRep_LineInter.cxx +++ b/src/TopOpeBRep/TopOpeBRep_LineInter.cxx @@ -345,6 +345,8 @@ Standard_Boolean TopOpeBRep_LineInter::IsPeriodic() const { case TopOpeBRep_CIRCLE : case TopOpeBRep_ELLIPSE : return Standard_True; + default: + break; } return Standard_False; } @@ -410,6 +412,8 @@ Standard_Integer TopOpeBRep_LineInter::NbWPoint() const switch (myTypeLineCurve) { case TopOpeBRep_WALKING : return myILW->NbPnts(); + default: + break; } return 0; } diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.cxx index 36e321d017..af47484110 100755 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.cxx @@ -141,7 +141,7 @@ TopOpeBRepBuild_VertexInfo::TopOpeBRepBuild_VertexInfo() void TopOpeBRepBuild_VertexInfo::Dump() const { printf(" *** Dump the Vertex Info ***\n"); - printf(" mySmart : %d\n", mySmart); + printf(" mySmart : %ud\n", mySmart); printf(" Edges : %d In, %d Out\n", myEdgesIn.Extent(), myEdgesOut.Extent()); diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index 204b854245..1703c7f67d 100755 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -266,12 +266,12 @@ static Graphic3d_Vertex& _MyProjReferencePoint() { V3d_View::V3d_View(const Handle(V3d_Viewer)& VM, const V3d_TypeOfView Type ) : MyType ( Type ), +MyProjModel(V3d_TPM_SCREEN), MyViewer(VM.operator->()), MyActiveLights(), MyViewContext (), myActiveLightsIterator(), SwitchSetFront(Standard_False), -MyProjModel(V3d_TPM_SCREEN), MyTrsf (1, 4, 1, 4) // S3892 { myImmediateUpdate = Standard_False; @@ -367,13 +367,13 @@ MyTrsf (1, 4, 1, 4) // S3892 V3d_View::V3d_View(const Handle(V3d_Viewer)& VM,const Handle(V3d_View)& V, const V3d_TypeOfView Type ) : MyType ( Type ), +MyProjModel(V3d_TPM_SCREEN), MyViewer(VM.operator->()), MyActiveLights(), MyViewContext (), myActiveLightsIterator(), SwitchSetFront(Standard_False), -MyTrsf (1, 4, 1, 4), // S3892 -MyProjModel(V3d_TPM_SCREEN) +MyTrsf (1, 4, 1, 4) // S3892 { Handle(Visual3d_View) FromView = V->View() ; diff --git a/src/Visual3d/Visual3d_ViewManager.cxx b/src/Visual3d/Visual3d_ViewManager.cxx index c3f0bfa10d..c97a78ad25 100755 --- a/src/Visual3d/Visual3d_ViewManager.cxx +++ b/src/Visual3d/Visual3d_ViewManager.cxx @@ -957,7 +957,7 @@ Standard_Boolean Exist = Standard_False; #if defined(_WIN32) || defined(__WIN32__) const Handle(WNT_Window) THEWindow = Handle(WNT_Window)::DownCast (AWindow); - int TheSpecifiedWindowId = int (THEWindow->HWindow ()); + Aspect_Handle TheSpecifiedWindowId = THEWindow->HWindow (); #elif defined(__APPLE__) && !defined(MACOSX_USE_GLX) const Handle(Cocoa_Window) THEWindow = Handle(Cocoa_Window)::DownCast (AWindow); NSView* TheSpecifiedWindowId = THEWindow->HView(); @@ -974,7 +974,7 @@ Standard_Boolean Exist = Standard_False; const Handle(Aspect_Window) AspectWindow = (MyIterator.Value ())->Window (); #if defined(_WIN32) || defined(__WIN32__) const Handle(WNT_Window) theWindow = Handle(WNT_Window)::DownCast (AspectWindow); - int TheWindowIdOfView = int (theWindow->HWindow ()); + Aspect_Handle TheWindowIdOfView = theWindow->HWindow (); #elif defined(__APPLE__) && !defined(MACOSX_USE_GLX) const Handle(Cocoa_Window) theWindow = Handle(Cocoa_Window)::DownCast (AspectWindow); NSView* TheWindowIdOfView = theWindow->HView(); diff --git a/src/VrmlData/VrmlData_ShapeConvert.cxx b/src/VrmlData/VrmlData_ShapeConvert.cxx index b70ff5a80b..f53bb634d0 100755 --- a/src/VrmlData/VrmlData_ShapeConvert.cxx +++ b/src/VrmlData/VrmlData_ShapeConvert.cxx @@ -294,6 +294,8 @@ void VrmlData_ShapeConvert::Convert (const Standard_Boolean theExtractFaces, } } break; + default: + break; } if (aTShapeNode.IsNull() == Standard_False) { diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index 984040471d..a8958e2962 100755 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -187,21 +187,25 @@ static Standard_Integer loadvrml shape = aScene.GetShape(ShapeAppMap); break; } - case VrmlData_EmptyData: aStr = "EmptyData"; break; - case VrmlData_UnrecoverableError: aStr = "UnrecoverableError"; break; - case VrmlData_GeneralError: aStr = "GeneralError"; break; - case VrmlData_EndOfFile: aStr = "EndOfFile"; break; - case VrmlData_NotVrmlFile: aStr = "NotVrmlFile"; break; - case VrmlData_CannotOpenFile: aStr = "CannotOpenFile"; break; - case VrmlData_VrmlFormatError: aStr = "VrmlFormatError"; break; - case VrmlData_NumericInputError: aStr = "NumericInputError"; break; - case VrmlData_IrrelevantNumber: aStr = "IrrelevantNumber"; break; - case VrmlData_BooleanInputError: aStr = "BooleanInputError"; break; - case VrmlData_StringInputError: aStr = "StringInputError"; break; - case VrmlData_NodeNameUnknown: aStr = "NodeNameUnknown"; break; - case VrmlData_NonPositiveSize: aStr = "NonPositiveSize"; break; - case VrmlData_ReadUnknownNode: aStr = "ReadUnknownNode"; break; - case VrmlData_NonSupportedFeature:aStr = "NonSupportedFeature"; break; + case VrmlData_EmptyData: aStr = "EmptyData"; break; + case VrmlData_UnrecoverableError: aStr = "UnrecoverableError"; break; + case VrmlData_GeneralError: aStr = "GeneralError"; break; + case VrmlData_EndOfFile: aStr = "EndOfFile"; break; + case VrmlData_NotVrmlFile: aStr = "NotVrmlFile"; break; + case VrmlData_CannotOpenFile: aStr = "CannotOpenFile"; break; + case VrmlData_VrmlFormatError: aStr = "VrmlFormatError"; break; + case VrmlData_NumericInputError: aStr = "NumericInputError"; break; + case VrmlData_IrrelevantNumber: aStr = "IrrelevantNumber"; break; + case VrmlData_BooleanInputError: aStr = "BooleanInputError"; break; + case VrmlData_StringInputError: aStr = "StringInputError"; break; + case VrmlData_NodeNameUnknown: aStr = "NodeNameUnknown"; break; + case VrmlData_NonPositiveSize: aStr = "NonPositiveSize"; break; + case VrmlData_ReadUnknownNode: aStr = "ReadUnknownNode"; break; + case VrmlData_NonSupportedFeature: aStr = "NonSupportedFeature"; break; + case VrmlData_OutputStreamUndefined:aStr = "OutputStreamUndefined"; break; + case VrmlData_NotImplemented: aStr = "NotImplemented"; break; + default: + break; } if (aStr) { di << " ++ VRML Error: " << aStr << " in line " diff --git a/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx b/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx index 88f021ca62..e1831233cb 100755 --- a/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx +++ b/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx @@ -160,6 +160,9 @@ Standard_Boolean XmlMNaming_NamedShapeDriver::Paste case TNaming_SELECTED: aBld.Select(aNewShape, anOldShape); break; + case TNaming_REPLACE: + aBld.Modify(anOldShape,aNewShape); + break; // for compatibility // case TNaming_REPLACE: // aBld.Replace(anOldShape,aNewShape); // break; @@ -248,7 +251,7 @@ static const XmlObjMgt_DOMString& EvolutionString(const TNaming_Evolution i) case TNaming_MODIFY : return ::EvolModifyString(); case TNaming_DELETE : return ::EvolDeleteString(); case TNaming_SELECTED : return ::EvolSelectedString(); - // case TNaming_REPLACE : return ::EvolReplaceString(); + case TNaming_REPLACE : return ::EvolModifyString(); // case TNaming_REPLACE : return ::EvolReplaceString(); for compatibility default: Standard_DomainError::Raise("TNaming_Evolution; enum term unknown"); } diff --git a/src/math/math_DoubleTab.gxx b/src/math/math_DoubleTab.gxx index 083ddb4d8d..65af8e2618 100755 --- a/src/math/math_DoubleTab.gxx +++ b/src/math/math_DoubleTab.gxx @@ -25,7 +25,7 @@ #include // macro to get size of C array -#define CARRAY_LENGTH(arr) (sizeof(arr)/sizeof(arr[0])) +#define CARRAY_LENGTH(arr) (int)(sizeof(arr)/sizeof(arr[0])) void math_DoubleTab::Allocate() { diff --git a/src/math/math_SingleTab.gxx b/src/math/math_SingleTab.gxx index cd4bdd1699..39de762d03 100755 --- a/src/math/math_SingleTab.gxx +++ b/src/math/math_SingleTab.gxx @@ -22,7 +22,7 @@ #include // macro to get size of C array -#define CARRAY_LENGTH(arr) (sizeof(arr)/sizeof(arr[0])) +#define CARRAY_LENGTH(arr) (int)(sizeof(arr)/sizeof(arr[0])) math_SingleTab::math_SingleTab(const Standard_Integer LowerIndex, const Standard_Integer UpperIndex) : -- 2.20.1