diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2020-07-17 17:55:06 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2020-07-17 17:55:06 -0700 |
| commit | f38a9c8d2991a94df9d629ae33ec25fa32b61af9 (patch) | |
| tree | d5d17edff63a88f4930956b341e2c6605b0e1b30 /py | |
| parent | 4b157aa6b8d925cbf29ceeb96da3a455f3a77f3b (diff) | |
Add cast for mpy-cross warning
Diffstat (limited to 'py')
| -rw-r--r-- | py/objarray.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objarray.c b/py/objarray.c index b868e62f9..83defa343 100644 --- a/py/objarray.c +++ b/py/objarray.c @@ -419,12 +419,12 @@ STATIC mp_obj_t buffer_finder(size_t n_args, const mp_obj_t *args, int direction } const byte *start = haystack_bufinfo.buf; - const byte *end = haystack_bufinfo.buf + haystack_bufinfo.len; + const byte *end = ((const byte*)haystack_bufinfo.buf) + haystack_bufinfo.len; if (n_args >= 3 && args[2] != mp_const_none) { start += mp_get_index(self_type, haystack_bufinfo.len, args[2], true); } if (n_args >= 4 && args[3] != mp_const_none) { - end = haystack_bufinfo.buf + mp_get_index(self_type, haystack_bufinfo.len, args[3], true); + end = ((const byte*)haystack_bufinfo.buf) + mp_get_index(self_type, haystack_bufinfo.len, args[3], true); } const byte *p = NULL; |
