apps/nshlib: Eliminate more new warnings found in build testing.
This commit is contained in:
parent
2bc4d1e8e2
commit
cb982ea8df
@ -1478,8 +1478,7 @@ FAR char *nsh_trimspaces(FAR char *str);
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NSH_VARS
|
#ifdef CONFIG_NSH_VARS
|
||||||
FAR const char *nsh_getvar(FAR struct nsh_vtbl_s *vtbl,
|
FAR char *nsh_getvar(FAR struct nsh_vtbl_s *vtbl, FAR const char *name);
|
||||||
FAR const char *name);
|
|
||||||
#ifndef CONFIG_NSH_DISABLE_SET
|
#ifndef CONFIG_NSH_DISABLE_SET
|
||||||
int nsh_setvar(FAR struct nsh_vtbl_s *vtbl, FAR const char *name,
|
int nsh_setvar(FAR struct nsh_vtbl_s *vtbl, FAR const char *name,
|
||||||
FAR const char *value);
|
FAR const char *value);
|
||||||
|
@ -460,7 +460,9 @@ int cmd_set(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
|||||||
#ifndef CONFIG_NSH_DISABLE_UNSET
|
#ifndef CONFIG_NSH_DISABLE_UNSET
|
||||||
int cmd_unset(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
int cmd_unset(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#if defined(CONFIG_NSH_VARS) || !defined(CONFIG_DISABLE_ENVIRON)
|
||||||
int status;
|
int status;
|
||||||
|
#endif
|
||||||
int ret = OK;
|
int ret = OK;
|
||||||
|
|
||||||
#if defined(CONFIG_NSH_VARS)
|
#if defined(CONFIG_NSH_VARS)
|
||||||
|
@ -159,7 +159,7 @@ static FAR char *nsh_strchr(FAR const char *str, int ch);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NSH_HAVE_VARS
|
#ifdef NSH_HAVE_VARS
|
||||||
static FAR const char *nsh_envexpand(FAR struct nsh_vtbl_s *vtbl,
|
static FAR char *nsh_envexpand(FAR struct nsh_vtbl_s *vtbl,
|
||||||
FAR char *varname);
|
FAR char *varname);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1014,8 +1014,7 @@ static FAR char *nsh_strchr(FAR const char *str, int ch)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef NSH_HAVE_VARS
|
#ifdef NSH_HAVE_VARS
|
||||||
static FAR const char *nsh_envexpand(FAR struct nsh_vtbl_s *vtbl,
|
static FAR char *nsh_envexpand(FAR struct nsh_vtbl_s *vtbl, FAR char *varname)
|
||||||
FAR char *varname)
|
|
||||||
{
|
{
|
||||||
/* Check for built-in variables */
|
/* Check for built-in variables */
|
||||||
|
|
||||||
@ -1032,7 +1031,7 @@ static FAR const char *nsh_envexpand(FAR struct nsh_vtbl_s *vtbl,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FAR const char *value;
|
FAR char *value;
|
||||||
|
|
||||||
#ifdef CONFIG_NSH_VARS
|
#ifdef CONFIG_NSH_VARS
|
||||||
/* Not a built-in? Return the value of the NSH variable with this
|
/* Not a built-in? Return the value of the NSH variable with this
|
||||||
|
Loading…
x
Reference in New Issue
Block a user