aboutsummaryrefslogtreecommitdiff
path: root/py/objint_mpz.c
diff options
context:
space:
mode:
authorJun Wu <quark@lihdd.net>2019-05-04 20:29:43 -0700
committerDamien George <damien.p.george@gmail.com>2019-05-06 18:28:28 +1000
commit089c9b71d10bd66549858254cc10803cba45453a (patch)
treee1f28ec6f5630e76eba8f5789977ff69e584f1e7 /py/objint_mpz.c
parent32ba679924b8f5c8a81cff905e6bd295c6bb4df8 (diff)
py: remove "if (0)" and "if (false)" branches.
Prior to this commit, building the unix port with `DEBUG=1` and `-finstrument-functions` the compilation would fail with an error like "control reaches end of non-void function". This change fixes this by removing the problematic "if (0)" branches. Not all branches affect compilation, but they are all removed for consistency.
Diffstat (limited to 'py/objint_mpz.c')
-rw-r--r--py/objint_mpz.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/objint_mpz.c b/py/objint_mpz.c
index 288e9f86d..121fd0342 100644
--- a/py/objint_mpz.c
+++ b/py/objint_mpz.c
@@ -194,18 +194,18 @@ mp_obj_t mp_obj_int_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs_i
return mp_obj_int_binary_op_extra_cases(op, lhs_in, rhs_in);
}
- if (0) {
#if MICROPY_PY_BUILTINS_FLOAT
- } else if (op == MP_BINARY_OP_TRUE_DIVIDE || op == MP_BINARY_OP_INPLACE_TRUE_DIVIDE) {
+ if (op == MP_BINARY_OP_TRUE_DIVIDE || op == MP_BINARY_OP_INPLACE_TRUE_DIVIDE) {
if (mpz_is_zero(zrhs)) {
goto zero_division_error;
}
mp_float_t flhs = mpz_as_float(zlhs);
mp_float_t frhs = mpz_as_float(zrhs);
return mp_obj_new_float(flhs / frhs);
+ } else
#endif
- } else if (op >= MP_BINARY_OP_INPLACE_OR && op < MP_BINARY_OP_CONTAINS) {
+ if (op >= MP_BINARY_OP_INPLACE_OR && op < MP_BINARY_OP_CONTAINS) {
mp_obj_int_t *res = mp_obj_int_new_mpz();
switch (op) {