py, unix: Allow to compile with -Wsign-compare.

See issue #699.
This commit is contained in:
Damien George
2015-01-16 17:47:07 +00:00
parent f12ea7c7ed
commit 963a5a3e82
23 changed files with 53 additions and 51 deletions

View File

@@ -364,7 +364,7 @@ STATIC mp_obj_t list_insert(mp_obj_t self_in, mp_obj_t idx, mp_obj_t obj) {
if (index < 0) {
index = 0;
}
if (index > self->len) {
if ((mp_uint_t)index > self->len) {
index = self->len;
}