mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 02:17:37 +08:00
NSH: Eliminate warning about unused variable.
This commit is contained in:
@@ -316,7 +316,9 @@ int cmd_set(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
|||||||
{
|
{
|
||||||
FAR char *value;
|
FAR char *value;
|
||||||
int ret = OK;
|
int ret = OK;
|
||||||
|
#ifndef CONFIG_DISABLE_ENVIRON
|
||||||
int ndx = 1;
|
int ndx = 1;
|
||||||
|
#endif
|
||||||
#ifndef CONFIG_NSH_DISABLESCRIPT
|
#ifndef CONFIG_NSH_DISABLESCRIPT
|
||||||
FAR char *popt;
|
FAR char *popt;
|
||||||
const char opts[] = NSH_NP_SET_OPTIONS;
|
const char opts[] = NSH_NP_SET_OPTIONS;
|
||||||
@@ -362,17 +364,20 @@ int cmd_set(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_DISABLE_ENVIRON
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
{
|
{
|
||||||
ndx = 2;
|
ndx = 2;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# ifndef CONFIG_DISABLE_ENVIRON
|
|
||||||
|
#ifndef CONFIG_DISABLE_ENVIRON
|
||||||
if (ret == OK && (argc == 3 || argc == 4))
|
if (ret == OK && (argc == 3 || argc == 4))
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* CONFIG_NSH_DISABLESCRIPT */
|
||||||
#ifndef CONFIG_DISABLE_ENVIRON
|
#ifndef CONFIG_DISABLE_ENVIRON
|
||||||
{
|
{
|
||||||
/* Trim whitespace from the value */
|
/* Trim whitespace from the value */
|
||||||
|
Reference in New Issue
Block a user