Skip to content

Commit 2a8f604

Browse files
agattidpgeorge
authored andcommitted
py/emitglue: Fix clear cache builtin warning on Clang for AArch32.
This commit fixes a warning occurring on Clang when calling `__builtin___clear_cache` with non-void pointers for its start and end memory area locations. The code now uses a char pointer for the end location, and it still builds without warnings on GCC. Signed-off-by: Alessandro Gatti <[email protected]>
1 parent 5784714 commit 2a8f604

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/emitglue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void mp_emit_glue_assign_native(mp_raw_code_t *rc, mp_raw_code_kind_t kind, cons
115115
#endif
116116
#elif MICROPY_EMIT_ARM
117117
#if (defined(__linux__) && defined(__GNUC__)) || __ARM_ARCH == 7
118-
__builtin___clear_cache((void *)fun_data, (uint8_t *)fun_data + fun_len);
118+
__builtin___clear_cache((void *)fun_data, (char *)fun_data + fun_len);
119119
#elif defined(__arm__)
120120
// Flush I-cache and D-cache.
121121
asm volatile (

0 commit comments

Comments
 (0)