Skip to content

Commit 897129a

Browse files
committed
py/objstr: Remove unreachable function used only for terse error msgs.
1 parent 290daa1 commit 897129a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

py/objstr.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,9 +881,14 @@ STATIC mp_obj_t arg_as_int(mp_obj_t arg) {
881881
return arg;
882882
}
883883

884+
#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
884885
STATIC NORETURN void terse_str_format_value_error(void) {
885886
mp_raise_ValueError("bad format string");
886887
}
888+
#else
889+
// define to nothing to improve coverage
890+
#define terse_str_format_value_error()
891+
#endif
887892

888893
STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *arg_i, mp_uint_t n_args, const mp_obj_t *args, mp_map_t *kwargs) {
889894
vstr_t vstr;

0 commit comments

Comments
 (0)