1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +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:
abv
2017-09-28 10:26:47 +03:00
parent e2b4dea253
commit b1811c1d2b
34 changed files with 573 additions and 359 deletions

View File

@@ -1392,6 +1392,7 @@ Standard_Real ResolutionCoeff(const BRepAdaptor_Curve& theBAC,
break;
}
}
Standard_FALLTHROUGH
case GeomAbs_Hyperbola :
case GeomAbs_Parabola :
case GeomAbs_OtherCurve :{
@@ -1467,6 +1468,7 @@ Standard_Real Resolution(const Handle(Geom_Curve)& theCurve,
break;
}
}
Standard_FALLTHROUGH
default:
aRes = theResCoeff * theR3D;
break;