mirror of
https://github.com/micropython/micropython.git
synced 2025-08-11 21:22:09 +02:00
py, extmod: Introduce and use MP_FALLTHROUGH macro.
Newer GCC versions are able to warn about switch cases that fall through. This is usually a sign of a forgotten break statement, but in the few cases where a fall through is intended we annotate it with this macro to avoid the warning.
This commit is contained in:
@@ -445,6 +445,7 @@ STATIC mp_obj_t set_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
|
||||
}
|
||||
return MP_OBJ_NEW_SMALL_INT(hash);
|
||||
}
|
||||
MP_FALLTHROUGH
|
||||
#endif
|
||||
default:
|
||||
return MP_OBJ_NULL; // op not supported
|
||||
|
Reference in New Issue
Block a user