summaryrefslogtreecommitdiffstatshomepage
path: root/py/argcheck.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-10-19 18:57:26 +1100
committerDamien George <damien.p.george@gmail.com>2017-10-19 18:57:26 +1100
commit93ce125abe41b5527eb92e483e64cc6d1a027ba0 (patch)
treeff2005836519574c2bef313fa0ed48a2b35d085d /py/argcheck.c
parentd6bf3658f44e22f06e0d293b8fe0542b57538b4f (diff)
downloadmicropython-93ce125abe41b5527eb92e483e64cc6d1a027ba0.tar.gz
micropython-93ce125abe41b5527eb92e483e64cc6d1a027ba0.zip
py/argcheck: Remove #if guard around terse error message helper func.
Not all compilers/analysers are smart enough to realise that this function is never called if MICROPY_ERROR_REPORTING is not TERSE, because the logic in the code uses if statements rather than #if to select whether to call this function or not (MSC in debug mode is an example of this, but there are others). So just unconditionally compile this helper function. The code-base anyway relies on the linker to remove unused functions.
Diffstat (limited to 'py/argcheck.c')
-rw-r--r--py/argcheck.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/py/argcheck.c b/py/argcheck.c
index add6f8de85..d53bca73a6 100644
--- a/py/argcheck.c
+++ b/py/argcheck.c
@@ -133,11 +133,9 @@ void mp_arg_parse_all_kw_array(size_t n_pos, size_t n_kw, const mp_obj_t *args,
mp_arg_parse_all(n_pos, args, &kw_args, n_allowed, allowed, out_vals);
}
-#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE || _MSC_VER
NORETURN void mp_arg_error_terse_mismatch(void) {
mp_raise_TypeError("argument num/types mismatch");
}
-#endif
#if MICROPY_CPYTHON_COMPAT
NORETURN void mp_arg_error_unimpl_kw(void) {