Skip to content

Commit 93ce125

Browse files
committed
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.
1 parent d6bf365 commit 93ce125

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

py/argcheck.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,9 @@ void mp_arg_parse_all_kw_array(size_t n_pos, size_t n_kw, const mp_obj_t *args,
133133
mp_arg_parse_all(n_pos, args, &kw_args, n_allowed, allowed, out_vals);
134134
}
135135

136-
#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE || _MSC_VER
137136
NORETURN void mp_arg_error_terse_mismatch(void) {
138137
mp_raise_TypeError("argument num/types mismatch");
139138
}
140-
#endif
141139

142140
#if MICROPY_CPYTHON_COMPAT
143141
NORETURN void mp_arg_error_unimpl_kw(void) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy