summaryrefslogtreecommitdiffstatshomepage
path: root/py/objint.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-20 12:47:20 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-20 12:47:20 +0000
commitff8dd3f486afb0d6ff1427d8a6a8a8ed73baa660 (patch)
tree16b54a843a312757976e15f24f413e00e151fbe2 /py/objint.c
parent50912e7f5dc579fd2917537046793dfa30decadf (diff)
downloadmicropython-ff8dd3f486afb0d6ff1427d8a6a8a8ed73baa660.tar.gz
micropython-ff8dd3f486afb0d6ff1427d8a6a8a8ed73baa660.zip
py, unix: Allow to compile with -Wunused-parameter.
See issue #699.
Diffstat (limited to 'py/objint.c')
-rw-r--r--py/objint.c4
1 files changed, 4 insertions, 0 deletions
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]);