Skip to content

Commit f38a9c8

Browse files
committed
Add cast for mpy-cross warning
1 parent 4b157aa commit f38a9c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

py/objarray.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,12 +419,12 @@ STATIC mp_obj_t buffer_finder(size_t n_args, const mp_obj_t *args, int direction
419419
}
420420

421421
const byte *start = haystack_bufinfo.buf;
422-
const byte *end = haystack_bufinfo.buf + haystack_bufinfo.len;
422+
const byte *end = ((const byte*)haystack_bufinfo.buf) + haystack_bufinfo.len;
423423
if (n_args >= 3 && args[2] != mp_const_none) {
424424
start += mp_get_index(self_type, haystack_bufinfo.len, args[2], true);
425425
}
426426
if (n_args >= 4 && args[3] != mp_const_none) {
427-
end = haystack_bufinfo.buf + mp_get_index(self_type, haystack_bufinfo.len, args[3], true);
427+
end = ((const byte*)haystack_bufinfo.buf) + mp_get_index(self_type, haystack_bufinfo.len, args[3], true);
428428
}
429429

430430
const byte *p = NULL;

0 commit comments

Comments
 (0)