From 963a5a3e82ded7ee75adae72ae7cb14796fa150e Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 16 Jan 2015 17:47:07 +0000 Subject: py, unix: Allow to compile with -Wsign-compare. See issue #699. --- py/objlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/objlist.c') diff --git a/py/objlist.c b/py/objlist.c index 911ddb98a..de3be4c86 100644 --- a/py/objlist.c +++ b/py/objlist.c @@ -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; } -- cgit v1.2.3