Skip to content

Commit 7c8d76f

Browse files
committed
unix/alloc: Make coverage build and its overzealous warnings happy.
1 parent c959860 commit 7c8d76f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

unix/alloc.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,20 @@ void mp_unix_mark_exec(void) {
8686
}
8787

8888
#if MICROPY_FORCE_PLAT_ALLOC_EXEC
89+
// Provide implementation of libffi ffi_closure_* functions in terms
90+
// of the functions above. On a normal Linux system, this save a lot
91+
// of code size.
92+
void *ffi_closure_alloc(size_t size, void **code);
93+
void ffi_closure_free(void *ptr);
94+
8995
void *ffi_closure_alloc(size_t size, void **code) {
9096
mp_uint_t dummy;
9197
mp_unix_alloc_exec(size, code, &dummy);
9298
return *code;
9399
}
94100

95101
void ffi_closure_free(void *ptr) {
102+
(void)ptr;
96103
// TODO
97104
}
98105
#endif

0 commit comments

Comments
 (0)