You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/07/08 13:01:57 UTC
[nuttx-apps] branch master updated: Remove the const cast from the initialization of boardioc_symtab_s::symtab
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new dab972b90 Remove the const cast from the initialization of boardioc_symtab_s::symtab
dab972b90 is described below
commit dab972b9070d6232fd50ff2ab71305556c5d08cd
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Jul 3 00:23:55 2023 +0800
Remove the const cast from the initialization of boardioc_symtab_s::symtab
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
examples/module/module_main.c | 2 +-
examples/posix_spawn/spawn_main.c | 2 +-
examples/thttpd/thttpd_main.c | 2 +-
netutils/thttpd/thttpd.c | 1 -
netutils/thttpd/thttpd_cgi.c | 1 -
nshlib/nsh_init.c | 2 +-
6 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/examples/module/module_main.c b/examples/module/module_main.c
index 0b940bc6c..3c72f5aa3 100644
--- a/examples/module/module_main.c
+++ b/examples/module/module_main.c
@@ -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)
diff --git a/examples/posix_spawn/spawn_main.c b/examples/posix_spawn/spawn_main.c
index a06915f73..38d6e180c 100644
--- a/examples/posix_spawn/spawn_main.c
+++ b/examples/posix_spawn/spawn_main.c
@@ -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);
diff --git a/examples/thttpd/thttpd_main.c b/examples/thttpd/thttpd_main.c
index fe51fb41d..84d6505e3 100644
--- a/examples/thttpd/thttpd_main.c
+++ b/examples/thttpd/thttpd_main.c
@@ -165,7 +165,7 @@
*/
FAR const struct symtab_s *g_thttpdsymtab;
-int g_thttpdnsymbols;
+int g_thttpdnsymbols;
#endif
/****************************************************************************
diff --git a/netutils/thttpd/thttpd.c b/netutils/thttpd/thttpd.c
index 5a662fcd9..6fe961c8d 100644
--- a/netutils/thttpd/thttpd.c
+++ b/netutils/thttpd/thttpd.c
@@ -57,7 +57,6 @@
#include <arpa/inet.h>
#include <nuttx/compiler.h>
-#include <nuttx/symtab.h>
#include "netutils/thttpd.h"
#include "config.h"
diff --git a/netutils/thttpd/thttpd_cgi.c b/netutils/thttpd/thttpd_cgi.c
index 38416f860..8387b4213 100644
--- a/netutils/thttpd/thttpd_cgi.c
+++ b/netutils/thttpd/thttpd_cgi.c
@@ -55,7 +55,6 @@
#include <errno.h>
#include <debug.h>
-#include <nuttx/symtab.h>
#include <nuttx/binfmt/binfmt.h>
#include "netutils/thttpd.h"
diff --git a/nshlib/nsh_init.c b/nshlib/nsh_init.c
index ae05e5bf5..64df54cb2 100644
--- a/nshlib/nsh_init.c
+++ b/nshlib/nsh_init.c
@@ -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);