diff options
| author | David Lechner <david@lechnology.com> | 2020-03-20 00:10:22 -0500 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2020-03-30 12:04:21 +1100 |
| commit | a2110bd3fca59df8b16a2b5fe4645a4af30b06ed (patch) | |
| tree | 6020938ca1fa3f9034ccef522e106c5e9255b49a /py/objarray.c | |
| parent | 3a0f64fc7aafe9fa39f518aec389ef5f55b40007 (diff) | |
all: Fix implicit casts of float/double, and signed comparison.
These were found by buiding the unix coverage variant on macOS (so clang
compiler). Mostly, these are fixing implicit cast of float/double to
mp_float_t which is one of those two and one mp_int_t to size_t fix for
good measure.
Diffstat (limited to 'py/objarray.c')
| -rw-r--r-- | py/objarray.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objarray.c b/py/objarray.c index 7f5cbf002..f56d60570 100644 --- a/py/objarray.c +++ b/py/objarray.c @@ -445,7 +445,7 @@ STATIC mp_obj_t array_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value } #endif if (len_adj > 0) { - if (len_adj > o->free) { + if ((size_t)len_adj > o->free) { // TODO: alloc policy; at the moment we go conservative o->items = m_renew(byte, o->items, (o->len + o->free) * item_sz, (o->len + len_adj) * item_sz); o->free = len_adj; |
