Fix another warnings and an error in typing introduced in the previous commit related to BINFS in PROTECTED mode.

This commit is contained in:
Gregory Nutt
2019-08-25 18:37:23 -06:00
parent 19b94da468
commit da9433a4c7
5 changed files with 15 additions and 10 deletions
+4
View File
@@ -68,6 +68,10 @@
# include <nuttx/spinlock.h> # include <nuttx/spinlock.h>
#endif #endif
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_FS_BINFS)
# include <nuttx/lib/builtin.h>
#endif
#ifdef CONFIG_LIB_BOARDCTL #ifdef CONFIG_LIB_BOARDCTL
/**************************************************************************** /****************************************************************************
+3 -3
View File
@@ -98,7 +98,7 @@ extern "C"
* application layer. * application layer.
*/ */
EXTERN FAR struct builtin_s * const *g_builtins; EXTERN FAR const struct builtin_s *g_builtins;
EXTERN int g_builtin_count; EXTERN int g_builtin_count;
#else #else
@@ -142,7 +142,7 @@ EXTERN const int g_builtin_count;
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_FS_BINFS) && \ #if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_FS_BINFS) && \
defined(__KERNEL__) defined(__KERNEL__)
void builtin_setlist(FAR struct builtin_s * const *builtins, int count); void builtin_setlist(FAR const struct builtin_s *builtins, int count);
#endif #endif
/**************************************************************************** /****************************************************************************
@@ -199,7 +199,7 @@ FAR const char *builtin_getname(int index);
* *
****************************************************************************/ ****************************************************************************/
FAR struct builtin_s const *builtin_for_index(int index); FAR const struct builtin_s *builtin_for_index(int index);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+5 -4
View File
@@ -58,6 +58,7 @@
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Common commands /* Common commands
* *
* CMD: BOARDIOC_INIT * CMD: BOARDIOC_INIT
@@ -223,7 +224,7 @@ struct boardioc_symtab_s
struct builtin_s; /* Forward reference */ struct builtin_s; /* Forward reference */
struct boardioc_builtin_s struct boardioc_builtin_s
{ {
FAR char * const *builtins; FAR const struct builtin_s *builtins;
int count; int count;
}; };
#endif #endif
@@ -235,9 +236,9 @@ struct boardioc_builtin_s
* *
* enum boardioc_usbdev_identifier_e: Identifies the USB device class. * enum boardioc_usbdev_identifier_e: Identifies the USB device class.
* In the case of multiple instances of the USB device class, the * In the case of multiple instances of the USB device class, the
* specific instance is identifed by the 'inst' field of the structure. * specific instance is identified by the 'inst' field of the structure.
* *
* enum boardioc_usbdev_action_e: Identifies the action to peform on * enum boardioc_usbdev_action_e: Identifies the action to perform on
* the USB device class instance. * the USB device class instance.
* *
* struct boardioc_usbdev_ctrl_s: * struct boardioc_usbdev_ctrl_s:
@@ -305,7 +306,7 @@ enum boardioc_termtype_e
{ {
BOARDIOC_XTERM_RAW = 0, /* Raw NX terminal window */ BOARDIOC_XTERM_RAW = 0, /* Raw NX terminal window */
BOARDIOC_XTERM_FRAMED, /* Framed NxTK terminal window */ BOARDIOC_XTERM_FRAMED, /* Framed NxTK terminal window */
BOARDIOC_XTERM_TOOLBAR /* Tooolbar of framed NxTK terminal window */ BOARDIOC_XTERM_TOOLBAR /* Toolbar of framed NxTK terminal window */
}; };
struct boardioc_nxterm_create_s struct boardioc_nxterm_create_s
+1 -1
View File
@@ -49,7 +49,7 @@
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
FAR struct builtin_s const *builtin_for_index(int index) FAR const struct builtin_s *builtin_for_index(int index)
{ {
if (index < g_builtin_count) if (index < g_builtin_count)
{ {
+2 -2
View File
@@ -55,7 +55,7 @@
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
FAR struct builtin_s * const *g_builtins; FAR const struct builtin_s *g_builtins;
int g_builtin_count; int g_builtin_count;
/**************************************************************************** /****************************************************************************
@@ -87,7 +87,7 @@ int g_builtin_count;
* *
****************************************************************************/ ****************************************************************************/
void builtin_setlist(FAR struct builtin_s * const *builtins, int count) void builtin_setlist(FAR const struct builtin_s *builtins, int count)
{ {
g_builtins = builtins; g_builtins = builtins;
g_builtin_count = count; g_builtin_count = count;