Remove the const cast from the initialization of boardioc_symtab_s::symtab

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-07-03 00:23:55 +08:00 committed by Petro Karashchenko
parent 4d79a5cbaf
commit dab972b907
6 changed files with 4 additions and 6 deletions

View File

@ -153,7 +153,7 @@ int main(int argc, FAR char *argv[])
#ifdef CONFIG_BUILD_FLAT
/* Set the OS symbol table indirectly through the boardctl() */
symdesc.symtab = (FAR struct symtab_s *)g_mod_exports;
symdesc.symtab = g_mod_exports;
symdesc.nsymbols = g_mod_nexports;
ret = boardctl(BOARDIOC_OS_SYMTAB, (uintptr_t)&symdesc);
if (ret < 0)

View File

@ -262,7 +262,7 @@ int main(int argc, FAR char *argv[])
/* Make sure that we are using our symbol tablee */
symdesc.symtab = (FAR struct symtab_s *)g_spawn_exports; /* Discard 'const' */
symdesc.symtab = g_spawn_exports;
symdesc.nsymbols = g_spawn_nexports;
boardctl(BOARDIOC_APP_SYMTAB, (uintptr_t)&symdesc);

View File

@ -165,7 +165,7 @@
*/
FAR const struct symtab_s *g_thttpdsymtab;
int g_thttpdnsymbols;
int g_thttpdnsymbols;
#endif
/****************************************************************************

View File

@ -57,7 +57,6 @@
#include <arpa/inet.h>
#include <nuttx/compiler.h>
#include <nuttx/symtab.h>
#include "netutils/thttpd.h"
#include "config.h"

View File

@ -55,7 +55,6 @@
#include <errno.h>
#include <debug.h>
#include <nuttx/symtab.h>
#include <nuttx/binfmt/binfmt.h>
#include "netutils/thttpd.h"

View File

@ -135,7 +135,7 @@ void nsh_initialize(void)
#if defined(CONFIG_NSH_SYMTAB)
/* Make sure that we are using our symbol table */
symdesc.symtab = (FAR struct symtab_s *)CONFIG_NSH_SYMTAB_ARRAYNAME; /* Discard 'const' */
symdesc.symtab = CONFIG_NSH_SYMTAB_ARRAYNAME;
symdesc.nsymbols = CONFIG_NSH_SYMTAB_COUNTNAME;
boardctl(BOARDIOC_APP_SYMTAB, (uintptr_t)&symdesc);