shell: Fix undefined macro warnings
Fix undefined macro warning if CONFIG_SHELL* options are not selected Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This commit is contained in:
parent
6cd70a5f85
commit
bdb0284b82
3 changed files with 3 additions and 3 deletions
|
@ -1409,7 +1409,7 @@ int shell_execute_cmd(const struct shell *shell, const char *cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shell == NULL) {
|
if (shell == NULL) {
|
||||||
#if CONFIG_SHELL_BACKEND_DUMMY
|
#if defined(CONFIG_SHELL_BACKEND_DUMMY)
|
||||||
shell = shell_backend_dummy_get_ptr();
|
shell = shell_backend_dummy_get_ptr();
|
||||||
#else
|
#else
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -284,7 +284,7 @@ static int cmd_help(const struct shell *shell, size_t argc, char **argv)
|
||||||
" all commands or its subcommands.\n"
|
" all commands or its subcommands.\n"
|
||||||
"You can try to call commands with <-h> or <--help> parameter"
|
"You can try to call commands with <-h> or <--help> parameter"
|
||||||
" for more information.");
|
" for more information.");
|
||||||
#if CONFIG_SHELL_METAKEYS
|
#if defined(CONFIG_SHELL_METAKEYS)
|
||||||
shell_print(shell,
|
shell_print(shell,
|
||||||
"Shell supports following meta-keys:\n"
|
"Shell supports following meta-keys:\n"
|
||||||
"Ctrl+a, Ctrl+b, Ctrl+c, Ctrl+d, Ctrl+e, Ctrl+f, Ctrl+k,"
|
"Ctrl+a, Ctrl+b, Ctrl+c, Ctrl+d, Ctrl+e, Ctrl+f, Ctrl+k,"
|
||||||
|
|
|
@ -107,7 +107,7 @@ static inline const char *TC_RESULT_TO_STR(int result)
|
||||||
TC_END_POST(result); \
|
TC_END_POST(result); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#if CONFIG_SHELL
|
#if defined(CONFIG_SHELL)
|
||||||
#define TC_CMD_DEFINE(name) \
|
#define TC_CMD_DEFINE(name) \
|
||||||
static int cmd_##name(const struct shell *shell, size_t argc, \
|
static int cmd_##name(const struct shell *shell, size_t argc, \
|
||||||
char **argv) \
|
char **argv) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue