From 2b05f467f09ec202a047656aac3ee1d516e954e0 Mon Sep 17 00:00:00 2001 From: Jakub Rzeszutko Date: Tue, 6 Sep 2022 09:11:31 +0200 Subject: [PATCH] shell: add missing asserts to api functions Add missing macro: __ASSERT_NO_MSG to API functions. Signed-off-by: Jakub Rzeszutko --- subsys/shell/shell.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subsys/shell/shell.c b/subsys/shell/shell.c index d8d0248703a..383d7bccb6c 100644 --- a/subsys/shell/shell.c +++ b/subsys/shell/shell.c @@ -1525,6 +1525,8 @@ void shell_fprintf(const struct shell *shell, enum shell_vt100_color color, void shell_hexdump_line(const struct shell *shell, unsigned int offset, const uint8_t *data, size_t len) { + __ASSERT_NO_MSG(shell); + int i; shell_fprintf(shell, SHELL_NORMAL, "%08X: ", offset); @@ -1564,6 +1566,8 @@ void shell_hexdump_line(const struct shell *shell, unsigned int offset, void shell_hexdump(const struct shell *shell, const uint8_t *data, size_t len) { + __ASSERT_NO_MSG(shell); + const uint8_t *p = data; size_t line_len; @@ -1681,6 +1685,8 @@ int shell_mode_delete_set(const struct shell *shell, bool val) void shell_set_bypass(const struct shell *sh, shell_bypass_cb_t bypass) { + __ASSERT_NO_MSG(sh); + sh->ctx->bypass = bypass; }