mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0029151: GCC 7.1 warnings "this statement may fall through" [-Wimplicit-fallthrough=]
New macro Standard_FALLTHROUGH is defined for use in a switch statement immediately before a case label, if code associated with the previous case label may fall through to that next label (i.e. does not end with "break" or "return" etc.). This macro indicates that the fall through is intentional and should not be diagnosed by a compiler that warns on fallthrough. The macro is inserted in places that currently generate such warning message and where fallthrough is intentional. Doxygen comments are provided for this and other macros in Standard_Macro.hxx.
This commit is contained in:
@@ -101,6 +101,7 @@ static IntPatch_SpecPntType IsPoleOrSeam(const Handle(Adaptor3d_HSurface)& theS1
|
||||
break;
|
||||
}
|
||||
}
|
||||
Standard_FALLTHROUGH
|
||||
case GeomAbs_Torus:
|
||||
if(aType == GeomAbs_Torus)
|
||||
{
|
||||
@@ -113,6 +114,7 @@ static IntPatch_SpecPntType IsPoleOrSeam(const Handle(Adaptor3d_HSurface)& theS1
|
||||
break;
|
||||
}
|
||||
}
|
||||
Standard_FALLTHROUGH
|
||||
case GeomAbs_Cylinder:
|
||||
theSingularSurfaceID = i + 1;
|
||||
AddVertexPoint(theLine, theVertex, theArrPeriods);
|
||||
|
@@ -428,6 +428,7 @@ void Recadre(const Standard_Boolean ,
|
||||
case GeomAbs_Torus:
|
||||
while(V1<(V1p-1.5*M_PI)) V1+=M_PI+M_PI;
|
||||
while(V1>(V1p+1.5*M_PI)) V1-=M_PI+M_PI;
|
||||
Standard_FALLTHROUGH
|
||||
case GeomAbs_Cylinder:
|
||||
case GeomAbs_Cone:
|
||||
case GeomAbs_Sphere:
|
||||
@@ -441,6 +442,7 @@ void Recadre(const Standard_Boolean ,
|
||||
case GeomAbs_Torus:
|
||||
while(V2<(V2p-1.5*M_PI)) V2+=M_PI+M_PI;
|
||||
while(V2>(V2p+1.5*M_PI)) V2-=M_PI+M_PI;
|
||||
Standard_FALLTHROUGH
|
||||
case GeomAbs_Cylinder:
|
||||
case GeomAbs_Cone:
|
||||
case GeomAbs_Sphere:
|
||||
|
@@ -166,6 +166,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1,
|
||||
if (Intersector.IsDone() && Intersector.IsEmpty())
|
||||
break;
|
||||
}
|
||||
Standard_FALLTHROUGH
|
||||
default:
|
||||
{
|
||||
IntPatch_PrmPrmIntersection interpp;
|
||||
|
Reference in New Issue
Block a user