From 01a8202135e5e8ac6fd83de7f57c142f66f71e32 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Thu, 11 Apr 2024 21:38:13 +0000 Subject: [PATCH] llext: fix llext_find_sym() not to return a "const" value Returned values are copies, so trying to "const" return values cannot have any effect. Fixes the following compiler warning: ``` llext.h:165: warning: type qualifiers ignored on function return type ``` Fixes commit 41e0a4a37141 ("llext: Linkable loadable extensions") Signed-off-by: Marc Herbert --- include/zephyr/llext/llext.h | 2 +- subsys/llext/llext.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/zephyr/llext/llext.h b/include/zephyr/llext/llext.h index 9250ac495c6..59a136ab5d4 100644 --- a/include/zephyr/llext/llext.h +++ b/include/zephyr/llext/llext.h @@ -164,7 +164,7 @@ int llext_unload(struct llext **ext); * @retval NULL if no symbol found * @retval addr Address of symbol in memory if found */ -const void * const llext_find_sym(const struct llext_symtable *sym_table, const char *sym_name); +const void *llext_find_sym(const struct llext_symtable *sym_table, const char *sym_name); /** * @brief Call a function by name diff --git a/subsys/llext/llext.c b/subsys/llext/llext.c index 8222de55028..c92f49abd60 100644 --- a/subsys/llext/llext.c +++ b/subsys/llext/llext.c @@ -114,7 +114,7 @@ int llext_iterate(int (*fn)(struct llext *ext, void *arg), void *arg) return ret; } -const void * const llext_find_sym(const struct llext_symtable *sym_table, const char *sym_name) +const void *llext_find_sym(const struct llext_symtable *sym_table, const char *sym_name) { if (sym_table == NULL) { /* Built-in symbol table */