aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-04-14 17:52:18 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2021-04-14 17:52:18 +0200
commitfe2d8065e3e3c251c054a30e9823977e20b5ab7c (patch)
treee020c35302c0fface2e39414cfae9f4ba6531b1c
parentba9f9c2d2c57f6041c6c01ba7c0e8379a5f5d440 (diff)
downloadbusybox-w32-fe2d8065e3e3c251c054a30e9823977e20b5ab7c.tar.gz
busybox-w32-fe2d8065e3e3c251c054a30e9823977e20b5ab7c.tar.bz2
busybox-w32-fe2d8065e3e3c251c054a30e9823977e20b5ab7c.zip
fix gcc-11.0 warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--include/libbb.h2
-rw-r--r--libbb/lineedit.c2
-rw-r--r--libbb/xfuncs_printf.c2
-rw-r--r--networking/udhcp/signalpipe.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/include/libbb.h b/include/libbb.h
index ece03e7d8..37732e14e 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -623,7 +623,7 @@ uoff_t FAST_FUNC get_volume_size_in_bytes(int fd,
623 unsigned override_units, 623 unsigned override_units,
624 int extend); 624 int extend);
625 625
626void xpipe(int filedes[2]) FAST_FUNC; 626void xpipe(int *filedes) FAST_FUNC;
627/* In this form code with pipes is much more readable */ 627/* In this form code with pipes is much more readable */
628struct fd_pair { int rd; int wr; }; 628struct fd_pair { int rd; int wr; };
629#define piped_pair(pair) pipe(&((pair).rd)) 629#define piped_pair(pair) pipe(&((pair).rd))
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 2cae4711a..68d19e127 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1314,7 +1314,7 @@ static NOINLINE void input_tab(smallint *lastWasTab)
1314 strcpy(&command[cursor_mb], chosen_match + match_pfx_len); 1314 strcpy(&command[cursor_mb], chosen_match + match_pfx_len);
1315 len = load_string(command); 1315 len = load_string(command);
1316 /* add match and tail */ 1316 /* add match and tail */
1317 sprintf(&command[cursor_mb], "%s%s", chosen_match + match_pfx_len, match_buf); 1317 stpcpy(stpcpy(&command[cursor_mb], chosen_match + match_pfx_len), match_buf);
1318 command_len = load_string(command); 1318 command_len = load_string(command);
1319 /* write out the matched command */ 1319 /* write out the matched command */
1320 /* paranoia: load_string can return 0 on conv error, 1320 /* paranoia: load_string can return 0 on conv error,
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c
index f0399ca45..d29acebcd 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)
224 return n; 224 return n;
225} 225}
226 226
227void FAST_FUNC xpipe(int filedes[2]) 227void FAST_FUNC xpipe(int *filedes)
228{ 228{
229 if (pipe(filedes)) 229 if (pipe(filedes))
230 bb_simple_perror_msg_and_die("can't create pipe"); 230 bb_simple_perror_msg_and_die("can't create pipe");
diff --git a/networking/udhcp/signalpipe.c b/networking/udhcp/signalpipe.c
index 7df671245..774c4beee 100644
--- a/networking/udhcp/signalpipe.c
+++ b/networking/udhcp/signalpipe.c
@@ -65,7 +65,7 @@ void FAST_FUNC udhcp_sp_setup(void)
65/* Quick little function to setup the pfds. 65/* Quick little function to setup the pfds.
66 * Limited in that you can only pass one extra fd. 66 * Limited in that you can only pass one extra fd.
67 */ 67 */
68void FAST_FUNC udhcp_sp_fd_set(struct pollfd pfds[2], int extra_fd) 68void FAST_FUNC udhcp_sp_fd_set(struct pollfd *pfds, int extra_fd)
69{ 69{
70 pfds[0].fd = READ_FD; 70 pfds[0].fd = READ_FD;
71 pfds[0].events = POLLIN; 71 pfds[0].events = POLLIN;