Skip to content
Permalink
Browse files

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>
  • Loading branch information...
aescolar authored and galak committed Jul 24, 2019
1 parent 6cd70a5 commit bdb0284b82ca2335e0254fbd77c58c7152ab0e0b
Showing with 3 additions and 3 deletions.
  1. +1 −1 subsys/shell/shell.c
  2. +1 −1 subsys/shell/shell_cmds.c
  3. +1 −1 subsys/testsuite/include/tc_util.h
@@ -1409,7 +1409,7 @@ int shell_execute_cmd(const struct shell *shell, const char *cmd)
}

if (shell == NULL) {
#if CONFIG_SHELL_BACKEND_DUMMY
#if defined(CONFIG_SHELL_BACKEND_DUMMY)
shell = shell_backend_dummy_get_ptr();
#else
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"
"You can try to call commands with <-h> or <--help> parameter"
" for more information.");
#if CONFIG_SHELL_METAKEYS
#if defined(CONFIG_SHELL_METAKEYS)
shell_print(shell,
"Shell supports following meta-keys:\n"
"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); \
} while (0)

#if CONFIG_SHELL
#if defined(CONFIG_SHELL)
#define TC_CMD_DEFINE(name) \
static int cmd_##name(const struct shell *shell, size_t argc, \
char **argv) \

0 comments on commit bdb0284

Please sign in to comment.
You can’t perform that action at this time.