diff options
author | Tom Rini <trini@konsulko.com> | 2022-01-31 13:21:40 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-01-31 13:21:40 -0500 |
commit | f495ce2c49932cac89026135d61f68fc2c52b2d8 (patch) | |
tree | 79f20d93673cef3ccc8b40e2e4894817657bd2a9 | |
parent | 013ea717b72636c504afc9ed48e15a13a305d9ce (diff) | |
download | u-boot-TEST/RFC-modernize-u-boot-shell.tar.gz |
cli_hush_2021_upstream: HACK: Remove warningsTEST/RFC-modernize-u-boot-shell
Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r-- | common/cli_hush_2021_upstream.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/cli_hush_2021_upstream.c b/common/cli_hush_2021_upstream.c index 498fd8d10b0..6297ea8f714 100644 --- a/common/cli_hush_2021_upstream.c +++ b/common/cli_hush_2021_upstream.c @@ -1448,6 +1448,7 @@ static void xxfree(void *ptr) * HUSH_DEBUG >= 2 prints line number in this file where it was detected. */ #if HUSH_DEBUG < 2 +#include <linux/compiler.h> # define msg_and_die_if_script(lineno, ...) msg_and_die_if_script(__VA_ARGS__) # define syntax_error(lineno, msg) syntax_error(msg) # define syntax_error_at(lineno, msg) syntax_error_at(msg) @@ -1465,7 +1466,7 @@ static void die_if_script(void) } } -static void msg_and_die_if_script(unsigned lineno, const char *fmt, ...) +static void __maybe_unused msg_and_die_if_script(unsigned lineno, const char *fmt, ...) { va_list p; @@ -1539,7 +1540,7 @@ static void syntax_error_unexpected_ch(unsigned lineno UNUSED_PARAM, int ch) /* Replace each \x with x in place, return ptr past NUL. */ static char *unbackslash(char *src) { - char *dst = src = strchrnul(src, '\\'); + char *dst = src = (char *)strchrnul(src, '\\'); while (1) { if (*src == '\\') { src++; |