summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-06-24 11:45:13 +1000
committerDamien George <damien@micropython.org>2021-06-25 10:58:22 +1000
commitcfd08448a1cba0040ad3c62bce02b5f8bd76dd1d (patch)
tree7b219fcad1ab7f0447071d3f252fc9c2e3c2a84c /py
parent08e0e065f4fa26cb1f52567ad53052310bc656e6 (diff)
py: Mark unused arguments from bytecode decoding macros.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py')
-rw-r--r--py/bc.h7
-rw-r--r--py/objfun.c3
2 files changed, 7 insertions, 3 deletions
diff --git a/py/bc.h b/py/bc.h
index 16f314e19..ef5afeae1 100644
--- a/py/bc.h
+++ b/py/bc.h
@@ -128,7 +128,9 @@
#define MP_BC_PRELUDE_SIG_DECODE(ip) \
size_t n_state, n_exc_stack, scope_flags, n_pos_args, n_kwonly_args, n_def_pos_args; \
- MP_BC_PRELUDE_SIG_DECODE_INTO(ip, n_state, n_exc_stack, scope_flags, n_pos_args, n_kwonly_args, n_def_pos_args)
+ MP_BC_PRELUDE_SIG_DECODE_INTO(ip, n_state, n_exc_stack, scope_flags, n_pos_args, n_kwonly_args, n_def_pos_args); \
+ (void)n_state; (void)n_exc_stack; (void)scope_flags; \
+ (void)n_pos_args; (void)n_kwonly_args; (void)n_def_pos_args
#define MP_BC_PRELUDE_SIZE_ENCODE(I, C, out_byte, out_env) \
do { \
@@ -163,7 +165,8 @@
#define MP_BC_PRELUDE_SIZE_DECODE(ip) \
size_t n_info, n_cell; \
- MP_BC_PRELUDE_SIZE_DECODE_INTO(ip, n_info, n_cell)
+ MP_BC_PRELUDE_SIZE_DECODE_INTO(ip, n_info, n_cell); \
+ (void)n_info; (void)n_cell
// Sentinel value for mp_code_state_t.exc_sp_idx
#define MP_CODE_STATE_EXC_SP_IDX_SENTINEL ((uint16_t)-1)
diff --git a/py/objfun.c b/py/objfun.c
index 178f83443..d86a4d235 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -200,7 +200,8 @@ STATIC void dump_args(const mp_obj_t *a, size_t sz) {
const uint8_t *ip = bytecode; \
size_t n_exc_stack, scope_flags, n_pos_args, n_kwonly_args, n_def_args; \
MP_BC_PRELUDE_SIG_DECODE_INTO(ip, n_state_out_var, n_exc_stack, scope_flags, n_pos_args, n_kwonly_args, n_def_args); \
- \
+ (void)scope_flags; (void)n_pos_args; (void)n_kwonly_args; (void)n_def_args; \
+ \
/* state size in bytes */ \
state_size_out_var = n_state_out_var * sizeof(mp_obj_t) \
+ n_exc_stack * sizeof(mp_exc_stack_t); \