From ff8dd3f486afb0d6ff1427d8a6a8a8ed73baa660 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 20 Jan 2015 12:47:20 +0000 Subject: py, unix: Allow to compile with -Wunused-parameter. See issue #699. --- py/objint.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'py/objint.c') diff --git a/py/objint.c b/py/objint.c index f1bd5dad7d..049d0410ea 100644 --- a/py/objint.c +++ b/py/objint.c @@ -42,6 +42,7 @@ // This dispatcher function is expected to be independent of the implementation of long int STATIC mp_obj_t mp_obj_int_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) { + (void)type_in; mp_arg_check_num(n_args, n_kw, 0, 2, false); switch (n_args) { @@ -78,6 +79,7 @@ STATIC mp_obj_t mp_obj_int_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_ } void mp_obj_int_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) { + (void)kind; // The size of this buffer is rather arbitrary. If it's not large // enough, a dynamic one will be allocated. char stack_buf[sizeof(mp_int_t) * 4]; @@ -311,6 +313,7 @@ STATIC mp_obj_t int_from_bytes(mp_uint_t n_args, const mp_obj_t *args) { // TODO: Support long ints // TODO: Support byteorder param (assumes 'little' at the moment) // TODO: Support signed param (assumes signed=False at the moment) + (void)n_args; // get the buffer info mp_buffer_info_t bufinfo; @@ -332,6 +335,7 @@ STATIC mp_obj_t int_to_bytes(mp_uint_t n_args, const mp_obj_t *args) { // TODO: Support long ints // TODO: Support byteorder param (assumes 'little') // TODO: Support signed param (assumes signed=False) + (void)n_args; mp_int_t val = mp_obj_int_get_checked(args[0]); mp_uint_t len = MP_OBJ_SMALL_INT_VALUE(args[1]); -- cgit v1.2.3