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

@@ -70,12 +70,12 @@ bool mp_seq_get_fast_slice_indexes(mp_uint_t len, mp_obj_t slice, mp_bound_slice
if (start < 0) {
start = 0;
}
} else if (start > len) {
} else if ((mp_uint_t)start > len) {
start = len;
}
if (stop < 0) {
stop = len + stop;
} else if (stop > len) {
} else if ((mp_uint_t)stop > len) {
stop = len;
}