diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-05-13 20:57:01 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-05-13 20:57:01 +0200 |
commit | 60a9414cad23b6e8cc6b13e37675826ed05f7709 (patch) | |
tree | 38b193f0468dd57728fe991e9eaed8abf088deeb /networking/ftpgetput.c | |
parent | 8dd29da2c667b6c9ae7381096320b9e31d3a50e2 (diff) | |
download | busybox-w32-60a9414cad23b6e8cc6b13e37675826ed05f7709.tar.gz busybox-w32-60a9414cad23b6e8cc6b13e37675826ed05f7709.tar.bz2 busybox-w32-60a9414cad23b6e8cc6b13e37675826ed05f7709.zip |
fix "variable 'foo' set but not used" warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/ftpgetput.c')
-rw-r--r-- | networking/ftpgetput.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index 66316e21f..f63df55f4 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
@@ -60,7 +60,7 @@ struct globals { | |||
60 | FILE *control_stream; | 60 | FILE *control_stream; |
61 | int verbose_flag; | 61 | int verbose_flag; |
62 | int do_continue; | 62 | int do_continue; |
63 | char buf[1]; /* actually [BUFSZ] */ | 63 | char buf[4]; /* actually [BUFSZ] */ |
64 | } FIX_ALIASING; | 64 | } FIX_ALIASING; |
65 | #define G (*(struct globals*)&bb_common_bufsiz1) | 65 | #define G (*(struct globals*)&bb_common_bufsiz1) |
66 | enum { BUFSZ = COMMON_BUFSIZE - offsetof(struct globals, buf) }; | 66 | enum { BUFSZ = COMMON_BUFSIZE - offsetof(struct globals, buf) }; |
@@ -105,7 +105,7 @@ static int ftpcmd(const char *s1, const char *s2) | |||
105 | } | 105 | } |
106 | 106 | ||
107 | do { | 107 | do { |
108 | strcpy(buf, "EOF"); | 108 | strcpy(buf, "EOF"); /* for ftp_die */ |
109 | if (fgets(buf, BUFSZ - 2, control_stream) == NULL) { | 109 | if (fgets(buf, BUFSZ - 2, control_stream) == NULL) { |
110 | ftp_die(NULL); | 110 | ftp_die(NULL); |
111 | } | 111 | } |
@@ -316,7 +316,6 @@ static const char ftpgetput_longopts[] ALIGN1 = | |||
316 | int ftpgetput_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 316 | int ftpgetput_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
317 | int ftpgetput_main(int argc UNUSED_PARAM, char **argv) | 317 | int ftpgetput_main(int argc UNUSED_PARAM, char **argv) |
318 | { | 318 | { |
319 | unsigned opt; | ||
320 | const char *port = "ftp"; | 319 | const char *port = "ftp"; |
321 | /* socket to ftp server */ | 320 | /* socket to ftp server */ |
322 | 321 | ||
@@ -345,7 +344,7 @@ int ftpgetput_main(int argc UNUSED_PARAM, char **argv) | |||
345 | applet_long_options = ftpgetput_longopts; | 344 | applet_long_options = ftpgetput_longopts; |
346 | #endif | 345 | #endif |
347 | opt_complementary = "-2:vv:cc"; /* must have 2 to 3 params; -v and -c count */ | 346 | opt_complementary = "-2:vv:cc"; /* must have 2 to 3 params; -v and -c count */ |
348 | opt = getopt32(argv, "cvu:p:P:", &user, &password, &port, | 347 | getopt32(argv, "cvu:p:P:", &user, &password, &port, |
349 | &verbose_flag, &do_continue); | 348 | &verbose_flag, &do_continue); |
350 | argv += optind; | 349 | argv += optind; |
351 | 350 | ||