Skip to content

Commit fb54eb5

Browse files
llext: symbol.h: Explicit typecast in EXPORT_SYMBOL macros
Some compilers (especially C++ compilers) will complain with invalid conversion (-fpermissive) if the void pointers are not explicitly typecast. This PR adds said typecast. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 10670b7 commit fb54eb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/zephyr/llext/symbol.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ struct llext_symtable {
7676
*/
7777
#define EXPORT_SYMBOL(x) \
7878
static const STRUCT_SECTION_ITERABLE(llext_const_symbol, x ## _sym) = { \
79-
.name = STRINGIFY(x), .addr = &x, \
79+
.name = STRINGIFY(x), .addr = (const void *)&x, \
8080
}
8181

8282
#define LL_EXTENSION_SYMBOL(x) \
8383
struct llext_symbol Z_GENERIC_SECTION(".exported_sym") __used \
84-
symbol_##x = {STRINGIFY(x), &x}
84+
symbol_##x = {STRINGIFY(x), (void *)&x}
8585

8686
/**
8787
* @brief Export a system call to a table of symbols

0 commit comments

Comments
 (0)