diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-18 22:28:26 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-18 22:28:26 +0000 |
commit | 5599502a550a7f892d4b73dceb2105a6916f83e6 (patch) | |
tree | 572ffa27892b1b24db86930044077dbb1565840f /networking | |
parent | e125a683a77d14401644d15f38b7f578db723924 (diff) | |
download | busybox-w32-5599502a550a7f892d4b73dceb2105a6916f83e6.tar.gz busybox-w32-5599502a550a7f892d4b73dceb2105a6916f83e6.tar.bz2 busybox-w32-5599502a550a7f892d4b73dceb2105a6916f83e6.zip |
more -Wall warning fixes. -Wall is enabled now.
Diffstat (limited to 'networking')
-rw-r--r-- | networking/telnet.c | 2 | ||||
-rw-r--r-- | networking/tftp.c | 12 | ||||
-rw-r--r-- | networking/wget.c | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/networking/telnet.c b/networking/telnet.c index 78229cd01..32e9993d3 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -68,7 +68,7 @@ struct globals { | |||
68 | const char *autologin; | 68 | const char *autologin; |
69 | #endif | 69 | #endif |
70 | #if ENABLE_FEATURE_AUTOWIDTH | 70 | #if ENABLE_FEATURE_AUTOWIDTH |
71 | int win_width, win_height; | 71 | unsigned win_width, win_height; |
72 | #endif | 72 | #endif |
73 | /* same buffer used both for network and console read/write */ | 73 | /* same buffer used both for network and console read/write */ |
74 | char buf[DATABUFSIZE]; | 74 | char buf[DATABUFSIZE]; |
diff --git a/networking/tftp.c b/networking/tftp.c index 143279757..36e63e0f7 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -246,7 +246,7 @@ static int tftp_protocol( | |||
246 | local_fd = open_or_warn(local_file, open_mode); | 246 | local_fd = open_or_warn(local_file, open_mode); |
247 | if (local_fd < 0) { | 247 | if (local_fd < 0) { |
248 | /*error_pkt_reason = ERR_NOFILE/ERR_ACCESS?*/ | 248 | /*error_pkt_reason = ERR_NOFILE/ERR_ACCESS?*/ |
249 | strcpy(error_pkt_str, "can't open file"); | 249 | strcpy((char*)error_pkt_str, "can't open file"); |
250 | goto send_err_pkt; | 250 | goto send_err_pkt; |
251 | } | 251 | } |
252 | } | 252 | } |
@@ -479,7 +479,7 @@ static int tftp_protocol( | |||
479 | if (recv_blk == block_nr) { | 479 | if (recv_blk == block_nr) { |
480 | int sz = full_write(local_fd, &rbuf[4], len - 4); | 480 | int sz = full_write(local_fd, &rbuf[4], len - 4); |
481 | if (sz != len - 4) { | 481 | if (sz != len - 4) { |
482 | strcpy(error_pkt_str, bb_msg_write_error); | 482 | strcpy((char*)error_pkt_str, bb_msg_write_error); |
483 | error_pkt_reason = ERR_WRITE; | 483 | error_pkt_reason = ERR_WRITE; |
484 | goto send_err_pkt; | 484 | goto send_err_pkt; |
485 | } | 485 | } |
@@ -525,12 +525,12 @@ static int tftp_protocol( | |||
525 | return finished == 0; /* returns 1 on failure */ | 525 | return finished == 0; /* returns 1 on failure */ |
526 | 526 | ||
527 | send_read_err_pkt: | 527 | send_read_err_pkt: |
528 | strcpy(error_pkt_str, bb_msg_read_error); | 528 | strcpy((char*)error_pkt_str, bb_msg_read_error); |
529 | send_err_pkt: | 529 | send_err_pkt: |
530 | if (error_pkt_str[0]) | 530 | if (error_pkt_str[0]) |
531 | bb_error_msg(error_pkt_str); | 531 | bb_error_msg((char*)error_pkt_str); |
532 | error_pkt[1] = TFTP_ERROR; | 532 | error_pkt[1] = TFTP_ERROR; |
533 | xsendto(socket_fd, error_pkt, 4 + 1 + strlen(error_pkt_str), | 533 | xsendto(socket_fd, error_pkt, 4 + 1 + strlen((char*)error_pkt_str), |
534 | &peer_lsa->u.sa, peer_lsa->len); | 534 | &peer_lsa->u.sa, peer_lsa->len); |
535 | return EXIT_FAILURE; | 535 | return EXIT_FAILURE; |
536 | } | 536 | } |
@@ -715,7 +715,7 @@ int tftpd_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
715 | 715 | ||
716 | return result; | 716 | return result; |
717 | err: | 717 | err: |
718 | strcpy(error_pkt_str, error_msg); | 718 | strcpy((char*)error_pkt_str, error_msg); |
719 | goto do_proto; | 719 | goto do_proto; |
720 | } | 720 | } |
721 | 721 | ||
diff --git a/networking/wget.c b/networking/wget.c index 7dd1d36f9..84ee1ca3e 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -54,9 +54,9 @@ enum { | |||
54 | STALLTIME = 5 /* Seconds when xfer considered "stalled" */ | 54 | STALLTIME = 5 /* Seconds when xfer considered "stalled" */ |
55 | }; | 55 | }; |
56 | 56 | ||
57 | static int getttywidth(void) | 57 | static unsigned int getttywidth(void) |
58 | { | 58 | { |
59 | int width; | 59 | unsigned width; |
60 | get_terminal_width_height(0, &width, NULL); | 60 | get_terminal_width_height(0, &width, NULL); |
61 | return width; | 61 | return width; |
62 | } | 62 | } |