CMake: Use GCC7's -Wimplicit-fallthrough=5

Use to avoid accidental missing break statements,
use ATTR_FALLTHROUGH to suppress.
This commit is contained in:
2017-05-20 14:01:03 +10:00
parent 6cd1d34dc1
commit 81e584ed17
44 changed files with 130 additions and 94 deletions

View File

@@ -65,7 +65,7 @@ static PyObject *Euler_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
case 2:
if ((order = euler_order_from_string(order_str, "mathutils.Euler()")) == -1)
return NULL;
/* fall-through */
ATTR_FALLTHROUGH;
case 1:
if (mathutils_array_parse(eul, EULER_SIZE, EULER_SIZE, seq, "mathutils.Euler()") == -1)
return NULL;
@@ -370,7 +370,7 @@ static PyObject *Euler_richcmpr(PyObject *a, PyObject *b, int op)
switch (op) {
case Py_NE:
ok = !ok;
/* fall-through */
ATTR_FALLTHROUGH;
case Py_EQ:
res = ok ? Py_False : Py_True;
break;