summaryrefslogtreecommitdiffstatshomepage
path: root/py/binary.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-16 17:47:07 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-16 17:47:07 +0000
commit963a5a3e82ded7ee75adae72ae7cb14796fa150e (patch)
tree78402c85b98c1c8f1889d7af7dc6f4828a8f55a5 /py/binary.c
parentf12ea7c7ed1ef97ee48c4356dbbc808cc2bdee4a (diff)
downloadmicropython-963a5a3e82ded7ee75adae72ae7cb14796fa150e.tar.gz
micropython-963a5a3e82ded7ee75adae72ae7cb14796fa150e.zip
py, unix: Allow to compile with -Wsign-compare.
See issue #699.
Diffstat (limited to 'py/binary.c')
-rw-r--r--py/binary.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/binary.c b/py/binary.c
index 69818e5361..683ba35045 100644
--- a/py/binary.c
+++ b/py/binary.c
@@ -256,7 +256,7 @@ void mp_binary_set_val(char struct_type, char val_type, mp_obj_t val_in, byte **
}
}
- mp_binary_set_int(MIN(size, sizeof(val)), struct_type == '>', p, val);
+ mp_binary_set_int(MIN((size_t)size, sizeof(val)), struct_type == '>', p, val);
}
void mp_binary_set_val_array(char typecode, void *p, mp_uint_t index, mp_obj_t val_in) {