diff options
author | tpaviot <tpaviot@gmail.com> | 2011-07-22 20:28:23 +0200 |
---|---|---|
committer | Denis Barbier <bouzim@gmail.com> | 2011-07-22 22:10:26 +0000 |
commit | 82de4a413299ed72eeb528e18a34baa5fb194fe4 (patch) | |
tree | d8d1511965d598408ba23755eeea2857a360ccf0 | |
parent | b710256bf3b0024c9b00f1f24d5ad70f07da574e (diff) | |
download | oce-82de4a413299ed72eeb528e18a34baa5fb194fe4.tar.gz oce-82de4a413299ed72eeb528e18a34baa5fb194fe4.zip |
[warning-fix][unhandled-enumeration-value]
Fix these warnings by adding a default NULL behavior:
default: /* Do nothing */ break;
Enough for fixing warnings, some cases would certainly
require than an exception is raised.
-rw-r--r-- | src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx | 2 | ||||
-rw-r--r-- | src/Aspect/Aspect_ColorScale.cxx | 1 | ||||
-rw-r--r-- | src/BRepExtrema/BRepExtrema_DistShapeShape.cxx | 2 | ||||
-rw-r--r-- | src/BRepExtrema/BRepExtrema_DistanceSS.cxx | 4 | ||||
-rw-r--r-- | src/ChFi3d/ChFi3d_Builder_0.cxx | 1 | ||||
-rw-r--r-- | src/DDocStd/DDocStd_ApplicationCommands.cxx | 3 | ||||
-rw-r--r-- | src/DNaming/DNaming_TransformationDriver.cxx | 1 | ||||
-rw-r--r-- | src/GeomAdaptor/GeomAdaptor_Surface.cxx | 12 | ||||
-rw-r--r-- | src/GeomInt/GeomInt_LineConstructor.cxx | 1 | ||||
-rw-r--r-- | src/Graphic2d/Graphic2d_SetOfMarkers.cxx | 2 | ||||
-rw-r--r-- | src/IntPatch/IntPatch_HInterTool.cxx | 1 | ||||
-rw-r--r-- | src/IntPatch/IntPatch_ImpPrmIntersection.cxx | 2 | ||||
-rw-r--r-- | src/IntPatch/IntPatch_Intersection.cxx | 1 | ||||
-rw-r--r-- | src/IntPatch/IntPatch_Point.cxx | 4 | ||||
-rw-r--r-- | src/IntTools/IntTools_LineConstructor.cxx | 1 | ||||
-rw-r--r-- | src/TopOpeBRep/TopOpeBRep_LineInter.cxx | 2 | ||||
-rw-r--r-- | src/VrmlData/VrmlData_ShapeConvert.cxx | 1 | ||||
-rw-r--r-- | src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 1 |
18 files changed, 41 insertions, 1 deletions
diff --git a/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx b/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx index 074a974b..b6faf8df 100644 --- a/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx +++ b/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx @@ -17,6 +17,7 @@ Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_HSurf return (nbs < 2 ? 2 : nbs); } case GeomAbs_Torus: return 20; + default: /* Do nothing */ break; } return 10; } @@ -38,6 +39,7 @@ Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_HSurf case GeomAbs_Torus: case GeomAbs_SurfaceOfRevolution: case GeomAbs_SurfaceOfExtrusion: return 15; + default: /* Do nothing */ break; } return 10; } diff --git a/src/Aspect/Aspect_ColorScale.cxx b/src/Aspect/Aspect_ColorScale.cxx index cbe7d440..72bb74b6 100644 --- a/src/Aspect/Aspect_ColorScale.cxx +++ b/src/Aspect/Aspect_ColorScale.cxx @@ -506,6 +506,7 @@ void Aspect_ColorScale::DrawScale( const Quantity_Color& aBgColor, case Aspect_TOCSP_RIGHT: x += colorWidth + spacer; break; + default: /* Do nothing */ break; } while ( i2 - i1 >= filter || ( i2 == 0 && i1 == 0 ) ) { Standard_Integer pos1 = i1; diff --git a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx index 2cb01295..d6c3d6ef 100644 --- a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx +++ b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx @@ -455,6 +455,7 @@ void BRepExtrema_DistShapeShape::Dump(Standard_OStream& o) const ParOnFaceS1(i,r1,r2); o << "parameters on the first face : u= " << r1 << " v=" << r2 << endl; break; + default: /* Do nothing */ break; } switch (SupportTypeShape2(i)) { @@ -466,6 +467,7 @@ void BRepExtrema_DistShapeShape::Dump(Standard_OStream& o) const ParOnFaceS2(i,r1,r2); o << "parameters on the second face : u= " << r1 << " v=" << r2 << endl; break; + default: /* Do nothing */ break; } o<<endl; } diff --git a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx index 79b42ab8..cf3fdc5c 100644 --- a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx +++ b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx @@ -527,6 +527,7 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& S1, const TopoDS_Shape& Perform( V1, F2, B1, B2 ); break; } + default: /* Do nothing */ break; } break; } @@ -567,6 +568,7 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& S1, const TopoDS_Shape& Perform( E1, F2, B1, B2 ); break; } + default: /* Do nothing */ break; } break; } @@ -599,9 +601,11 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& S1, const TopoDS_Shape& Perform( F1, F2, B1, B2 ); break; } + default: /* Do nothing */ break; } break; } + default: /* Do nothing */ break; } } diff --git a/src/ChFi3d/ChFi3d_Builder_0.cxx b/src/ChFi3d/ChFi3d_Builder_0.cxx index 38dda99f..19d8cdb9 100644 --- a/src/ChFi3d/ChFi3d_Builder_0.cxx +++ b/src/ChFi3d/ChFi3d_Builder_0.cxx @@ -1749,6 +1749,7 @@ TopAbs_Orientation ChFi3d_TrsfTrans(const IntSurf_TypeTrans T1) switch (T1) { case IntSurf_In: return TopAbs_FORWARD; case IntSurf_Out: return TopAbs_REVERSED; + default: /* Do nothing */ break; } return TopAbs_INTERNAL; } diff --git a/src/DDocStd/DDocStd_ApplicationCommands.cxx b/src/DDocStd/DDocStd_ApplicationCommands.cxx index ae4296ef..6d189101 100644 --- a/src/DDocStd/DDocStd_ApplicationCommands.cxx +++ b/src/DDocStd/DDocStd_ApplicationCommands.cxx @@ -193,7 +193,7 @@ static Standard_Integer DDocStd_Open (Draw_Interpretor& di, di << " could not retrieve , permission denied " << "\n" ; break; } - + default: /* Do nothing */ break; } di << "DDocStd_Open : Error" << "\n"; } @@ -255,6 +255,7 @@ static Standard_Integer DDocStd_SaveAs (Draw_Interpretor& di, case CDF_SS_Failure: { di << " Write failure " << "\n" ; } + default: /* Do nothing */ break; } return 1; } else { diff --git a/src/DNaming/DNaming_TransformationDriver.cxx b/src/DNaming/DNaming_TransformationDriver.cxx index ee93736e..99d38ae1 100644 --- a/src/DNaming/DNaming_TransformationDriver.cxx +++ b/src/DNaming/DNaming_TransformationDriver.cxx @@ -314,6 +314,7 @@ static void CollectShapes(const TopoDS_Shape& SSh, TopoDS_Compound& C, // TagMap.Bind(SSh, aNS->Label().Tag()); } break; + default: /* Do nothing */ break; } } diff --git a/src/GeomAdaptor/GeomAdaptor_Surface.cxx b/src/GeomAdaptor/GeomAdaptor_Surface.cxx index d56c8d59..a8aabd32 100644 --- a/src/GeomAdaptor/GeomAdaptor_Surface.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Surface.cxx @@ -181,6 +181,7 @@ GeomAbs_Shape GeomAdaptor_Surface::UContinuity() const case GeomAbs_CN : return GeomAbs_CN; case GeomAbs_C2 : return GeomAbs_C1; case GeomAbs_C1 : return GeomAbs_C0; + default: /* Do nothing */ break; } Standard_NoSuchObject::Raise("GeomAdaptor_Surface::UContinuity"); break; @@ -192,6 +193,7 @@ GeomAbs_Shape GeomAdaptor_Surface::UContinuity() const return GC.Continuity(); } case GeomAbs_OtherSurface: Standard_NoSuchObject::Raise("GeomAdaptor_Surface::UContinuity"); + default: /* Do nothing */ break; } return GeomAbs_CN; } @@ -222,6 +224,7 @@ GeomAbs_Shape GeomAdaptor_Surface::VContinuity() const case GeomAbs_CN : return GeomAbs_CN; case GeomAbs_C2 : return GeomAbs_C1; case GeomAbs_C1 : return GeomAbs_C0; + default: /* Do nothing */ break; } Standard_NoSuchObject::Raise("GeomAdaptor_Surface::VContinuity"); break; @@ -233,6 +236,7 @@ GeomAbs_Shape GeomAdaptor_Surface::VContinuity() const return GC.Continuity(); } case GeomAbs_OtherSurface: Standard_NoSuchObject::Raise("GeomAdaptor_Surface::VContinuity"); + default: /* Do nothing */ break; } return GeomAbs_CN; } @@ -270,10 +274,12 @@ 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; + default: /* Do nothing */ break; } GeomAdaptor_Surface Sur((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface()); return Sur.NbUIntervals(BaseS); } + default: /* Do nothing */ break; } return 1; } @@ -311,10 +317,12 @@ 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; + default: /* Do nothing */ break; } GeomAdaptor_Surface Sur((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface()); return Sur.NbVIntervals(BaseS); } + default: /* Do nothing */ break; } return 1; } @@ -359,11 +367,13 @@ 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; + default: /* Do nothing */ break; } GeomAdaptor_Surface Sur((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface()); myNbUIntervals = Sur.NbUIntervals(BaseS); Sur.UIntervals(T, BaseS); } + default: /* Do nothing */ break; } T(T.Lower()) = myUFirst; @@ -410,11 +420,13 @@ 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; + default: /* Do nothing */ break; } GeomAdaptor_Surface Sur((*((Handle(Geom_OffsetSurface)*)&mySurface))->BasisSurface()); myNbVIntervals = Sur.NbVIntervals(BaseS); Sur.VIntervals(T, BaseS); } + default: /* Do nothing */ break; } T(T.Lower()) = myVFirst; diff --git a/src/GeomInt/GeomInt_LineConstructor.cxx b/src/GeomInt/GeomInt_LineConstructor.cxx index ba3af375..5bf2acc5 100644 --- a/src/GeomInt/GeomInt_LineConstructor.cxx +++ b/src/GeomInt/GeomInt_LineConstructor.cxx @@ -244,6 +244,7 @@ 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; + default: /* Do nothing */ break; } Parameters(myHS1,myHS2,Pmid,u1,v1,u2,v2); Recadre(myHS1,myHS2,u1,v1,u2,v2); diff --git a/src/Graphic2d/Graphic2d_SetOfMarkers.cxx b/src/Graphic2d/Graphic2d_SetOfMarkers.cxx index 1979d129..fe6200cf 100644 --- a/src/Graphic2d/Graphic2d_SetOfMarkers.cxx +++ b/src/Graphic2d/Graphic2d_SetOfMarkers.cxx @@ -292,6 +292,7 @@ Standard_Boolean Graphic2d_SetOfMarkers::Pick( const Standard_ShortReal X1, return Standard_True; break; } + default: /* Do nothing */ break; } #endif return Standard_False; @@ -332,6 +333,7 @@ Standard_Boolean Graphic2d_SetOfMarkers return Standard_True; break; } + default: /* Do nothing */ break; } #endif return Standard_False; diff --git a/src/IntPatch/IntPatch_HInterTool.cxx b/src/IntPatch/IntPatch_HInterTool.cxx index ba9c05a8..4e8b12fb 100644 --- a/src/IntPatch/IntPatch_HInterTool.cxx +++ b/src/IntPatch/IntPatch_HInterTool.cxx @@ -71,6 +71,7 @@ Standard_Integer IntPatch_HInterTool::NbSamplesU (const Handle(Adaptor3d_HSurfac //case GeomAbs_Sphere: //case GeomAbs_SurfaceOfRevolution: //case GeomAbs_SurfaceOfExtrusion: return 10; + default: /* Do nothing */ break; } return 10; } diff --git a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx index 7d5fd564..af7a0d62 100644 --- a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx @@ -359,6 +359,7 @@ void Recadre(const Standard_Boolean , case GeomAbs_Sphere: while(U1<(U1p-1.5*PI)) U1+=PI+PI; while(U1>(U1p+1.5*PI)) U1-=PI+PI; + default: /* Do nothing */ break; } switch(typeS2) { @@ -370,6 +371,7 @@ void Recadre(const Standard_Boolean , case GeomAbs_Sphere: while(U2<(U2p-1.5*PI)) U2+=PI+PI; while(U2>(U2p+1.5*PI)) U2-=PI+PI; + default: /* Do nothing */ break; } pt.SetParameters(U1,V1,U2,V2); } diff --git a/src/IntPatch/IntPatch_Intersection.cxx b/src/IntPatch/IntPatch_Intersection.cxx index 43b5c04f..3bd86c77 100644 --- a/src/IntPatch/IntPatch_Intersection.cxx +++ b/src/IntPatch/IntPatch_Intersection.cxx @@ -614,6 +614,7 @@ static void FUN_NewFirstLast(const GeomAbs_CurveType& ga_ct, } break; } + default: /* Do nothing */ break; } } //================================================================================ diff --git a/src/IntPatch/IntPatch_Point.cxx b/src/IntPatch/IntPatch_Point.cxx index aea1e078..7edcff39 100644 --- a/src/IntPatch/IntPatch_Point.cxx +++ b/src/IntPatch/IntPatch_Point.cxx @@ -68,6 +68,7 @@ void IntPatch_Point::ReverseTransition() { case IntSurf_In: TLine.SetValue(Standard_False,IntSurf_Out); break; case IntSurf_Out: TLine.SetValue(Standard_False,IntSurf_In); break; + default: /* Do nothing */ break; } traline1=TLine; IntSurf_Transition TArc; @@ -75,6 +76,7 @@ void IntPatch_Point::ReverseTransition() { case IntSurf_In: TArc.SetValue(Standard_False,IntSurf_Out); break; case IntSurf_Out: TArc.SetValue(Standard_False,IntSurf_In); break; + default: /* Do nothing */ break; } tra1=TArc; } @@ -85,6 +87,7 @@ void IntPatch_Point::ReverseTransition() { case IntSurf_In: TLine.SetValue(Standard_False,IntSurf_Out); break; case IntSurf_Out: TLine.SetValue(Standard_False,IntSurf_In); break; + default: /* Do nothing */ break; } traline2=TLine; IntSurf_Transition TArc; @@ -92,6 +95,7 @@ void IntPatch_Point::ReverseTransition() { case IntSurf_In: TArc.SetValue(Standard_False,IntSurf_Out); break; case IntSurf_Out: TArc.SetValue(Standard_False,IntSurf_In); break; + default: /* Do nothing */ break; } tra2=TArc; } diff --git a/src/IntTools/IntTools_LineConstructor.cxx b/src/IntTools/IntTools_LineConstructor.cxx index 302485f7..5782189f 100644 --- a/src/IntTools/IntTools_LineConstructor.cxx +++ b/src/IntTools/IntTools_LineConstructor.cxx @@ -323,6 +323,7 @@ void IntTools_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; + default: /* Do nothing */ break; } Parameters(myHS1,myHS2,Pmid,u1,v1,u2,v2); Recadre(myHS1,myHS2,u1,v1,u2,v2); diff --git a/src/TopOpeBRep/TopOpeBRep_LineInter.cxx b/src/TopOpeBRep/TopOpeBRep_LineInter.cxx index 83d6f676..0d3a9613 100644 --- a/src/TopOpeBRep/TopOpeBRep_LineInter.cxx +++ b/src/TopOpeBRep/TopOpeBRep_LineInter.cxx @@ -329,6 +329,7 @@ Standard_Boolean TopOpeBRep_LineInter::IsPeriodic() const { case TopOpeBRep_CIRCLE : case TopOpeBRep_ELLIPSE : return Standard_True; + default: /* Do nothing */ break; } return Standard_False; } @@ -394,6 +395,7 @@ Standard_Integer TopOpeBRep_LineInter::NbWPoint() const switch (myTypeLineCurve) { case TopOpeBRep_WALKING : return myILW->NbPnts(); + default: /* Do nothing */ break; } return 0; } diff --git a/src/VrmlData/VrmlData_ShapeConvert.cxx b/src/VrmlData/VrmlData_ShapeConvert.cxx index b585b31e..6407ae14 100644 --- a/src/VrmlData/VrmlData_ShapeConvert.cxx +++ b/src/VrmlData/VrmlData_ShapeConvert.cxx @@ -279,6 +279,7 @@ void VrmlData_ShapeConvert::Convert (const Standard_Boolean theExtractFaces, } } break; + default: /* Do nothing */ break; } if (aTShapeNode.IsNull() == Standard_False) { diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index 1a5e188c..8606480e 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -163,6 +163,7 @@ static Standard_Integer loadvrml case VrmlData_NonPositiveSize: aStr = "NonPositiveSize"; break; case VrmlData_ReadUnknownNode: aStr = "ReadUnknownNode"; break; case VrmlData_NonSupportedFeature:aStr = "NonSupportedFeature"; break; + default: /* Do nothing */ break; } if (aStr) { di << " ++ VRML Error: " << aStr << " in line " |