From fe2d8065e3e3c251c054a30e9823977e20b5ab7c Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 14 Apr 2021 17:52:18 +0200 Subject: fix gcc-11.0 warnings Signed-off-by: Denys Vlasenko --- libbb/lineedit.c | 2 +- libbb/xfuncs_printf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libbb') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 2cae471..68d19e1 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -1314,7 +1314,7 @@ static NOINLINE void input_tab(smallint *lastWasTab) strcpy(&command[cursor_mb], chosen_match + match_pfx_len); len = load_string(command); /* add match and tail */ - sprintf(&command[cursor_mb], "%s%s", chosen_match + match_pfx_len, match_buf); + stpcpy(stpcpy(&command[cursor_mb], chosen_match + match_pfx_len), match_buf); command_len = load_string(command); /* write out the matched command */ /* paranoia: load_string can return 0 on conv error, diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c index f0399ca..d29aceb 100644 --- a/libbb/xfuncs_printf.c +++ b/libbb/xfuncs_printf.c @@ -224,7 +224,7 @@ int FAST_FUNC rename_or_warn(const char *oldpath, const char *newpath) return n; } -void FAST_FUNC xpipe(int filedes[2]) +void FAST_FUNC xpipe(int *filedes) { if (pipe(filedes)) bb_simple_perror_msg_and_die("can't create pipe"); -- cgit v1.1