diff options
| author | Eric Andersen <andersen@codepoet.org> | 2006-01-30 22:30:41 +0000 |
|---|---|---|
| committer | Eric Andersen <andersen@codepoet.org> | 2006-01-30 22:30:41 +0000 |
| commit | 0cb6f35c33a2a3fd390aaa36da72e0600f205918 (patch) | |
| tree | 6f685077a27f04869b4f152cbe4287c023554afb | |
| parent | 5e678873f9ff7c95d43b278feee547ce989b3b20 (diff) | |
| download | busybox-w32-0cb6f35c33a2a3fd390aaa36da72e0600f205918.tar.gz busybox-w32-0cb6f35c33a2a3fd390aaa36da72e0600f205918.tar.bz2 busybox-w32-0cb6f35c33a2a3fd390aaa36da72e0600f205918.zip | |
fix up annoying signed/unsigned and mixed type errors
| -rw-r--r-- | networking/arping.c | 8 | ||||
| -rw-r--r-- | networking/httpd.c | 4 | ||||
| -rw-r--r-- | networking/interface.c | 4 | ||||
| -rw-r--r-- | networking/route.c | 2 | ||||
| -rw-r--r-- | networking/telnet.c | 2 | ||||
| -rw-r--r-- | networking/telnetd.c | 2 | ||||
| -rw-r--r-- | networking/traceroute.c | 4 | ||||
| -rw-r--r-- | networking/wget.c | 4 | ||||
| -rw-r--r-- | networking/zcip.c | 2 |
9 files changed, 17 insertions, 15 deletions
diff --git a/networking/arping.c b/networking/arping.c index 95ca1ed2e..b66dbff1e 100644 --- a/networking/arping.c +++ b/networking/arping.c | |||
| @@ -404,7 +404,7 @@ int arping_main(int argc, char **argv) | |||
| 404 | } | 404 | } |
| 405 | } else if (!dad) { | 405 | } else if (!dad) { |
| 406 | int on = 1; | 406 | int on = 1; |
| 407 | int alen = sizeof(saddr); | 407 | socklen_t alen = sizeof(saddr); |
| 408 | 408 | ||
| 409 | saddr.sin_port = htons(1025); | 409 | saddr.sin_port = htons(1025); |
| 410 | saddr.sin_addr = dst; | 410 | saddr.sin_addr = dst; |
| @@ -437,7 +437,7 @@ int arping_main(int argc, char **argv) | |||
| 437 | } | 437 | } |
| 438 | 438 | ||
| 439 | { | 439 | { |
| 440 | int alen = sizeof(me); | 440 | socklen_t alen = sizeof(me); |
| 441 | 441 | ||
| 442 | if (getsockname(s, (struct sockaddr *) &me, &alen) == -1) { | 442 | if (getsockname(s, (struct sockaddr *) &me, &alen) == -1) { |
| 443 | bb_error_msg("getsockname"); | 443 | bb_error_msg("getsockname"); |
| @@ -479,9 +479,9 @@ int arping_main(int argc, char **argv) | |||
| 479 | 479 | ||
| 480 | while (1) { | 480 | while (1) { |
| 481 | sigset_t sset, osset; | 481 | sigset_t sset, osset; |
| 482 | char packet[4096]; | 482 | unsigned char packet[4096]; |
| 483 | struct sockaddr_ll from; | 483 | struct sockaddr_ll from; |
| 484 | int alen = sizeof(from); | 484 | socklen_t alen = sizeof(from); |
| 485 | int cc; | 485 | int cc; |
| 486 | 486 | ||
| 487 | if ((cc = recvfrom(s, packet, sizeof(packet), 0, | 487 | if ((cc = recvfrom(s, packet, sizeof(packet), 0, |
diff --git a/networking/httpd.c b/networking/httpd.c index c00f3e46d..b44adf730 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
| @@ -123,8 +123,10 @@ static const char home[] = "./"; | |||
| 123 | 123 | ||
| 124 | #ifdef CONFIG_LFS | 124 | #ifdef CONFIG_LFS |
| 125 | # define cont_l_fmt "%lld" | 125 | # define cont_l_fmt "%lld" |
| 126 | # define cont_l_type (long long) | ||
| 126 | #else | 127 | #else |
| 127 | # define cont_l_fmt "%ld" | 128 | # define cont_l_fmt "%ld" |
| 129 | # define cont_l_type (long) | ||
| 128 | #endif | 130 | #endif |
| 129 | 131 | ||
| 130 | #define TIMEOUT 60 | 132 | #define TIMEOUT 60 |
| @@ -1028,7 +1030,7 @@ static int sendHeaders(HttpResponseNum responseNum) | |||
| 1028 | if (config->ContentLength != -1) { /* file */ | 1030 | if (config->ContentLength != -1) { /* file */ |
| 1029 | strftime(timeStr, sizeof(timeStr), RFC1123FMT, gmtime(&config->last_mod)); | 1031 | strftime(timeStr, sizeof(timeStr), RFC1123FMT, gmtime(&config->last_mod)); |
| 1030 | len += sprintf(buf+len, "Last-Modified: %s\r\n%s " cont_l_fmt "\r\n", | 1032 | len += sprintf(buf+len, "Last-Modified: %s\r\n%s " cont_l_fmt "\r\n", |
| 1031 | timeStr, Content_length, config->ContentLength); | 1033 | timeStr, Content_length, cont_l_type config->ContentLength); |
| 1032 | } | 1034 | } |
| 1033 | strcat(buf, "\r\n"); | 1035 | strcat(buf, "\r\n"); |
| 1034 | len += 2; | 1036 | len += 2; |
diff --git a/networking/interface.c b/networking/interface.c index ad6c40fc1..b2c746be9 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
| @@ -501,7 +501,7 @@ static char *UNSPEC_sprint(struct sockaddr *sap, int numeric) | |||
| 501 | 501 | ||
| 502 | if (sap->sa_family == 0xFFFF || sap->sa_family == 0) | 502 | if (sap->sa_family == 0xFFFF || sap->sa_family == 0) |
| 503 | return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf)); | 503 | return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf)); |
| 504 | return (UNSPEC_print(sap->sa_data)); | 504 | return (UNSPEC_print((unsigned char *)sap->sa_data)); |
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | static struct aftype unspec_aftype = { | 507 | static struct aftype unspec_aftype = { |
| @@ -1833,7 +1833,7 @@ static void ife_print(struct interface *ptr) | |||
| 1833 | hardware address if it's null. */ | 1833 | hardware address if it's null. */ |
| 1834 | if (hw->print != NULL && (!(hw_null_address(hw, ptr->hwaddr) && | 1834 | if (hw->print != NULL && (!(hw_null_address(hw, ptr->hwaddr) && |
| 1835 | hw->suppress_null_addr))) | 1835 | hw->suppress_null_addr))) |
| 1836 | printf(_("HWaddr %s "), hw->print(ptr->hwaddr)); | 1836 | printf(_("HWaddr %s "), hw->print((unsigned char *)ptr->hwaddr)); |
| 1837 | #ifdef IFF_PORTSEL | 1837 | #ifdef IFF_PORTSEL |
| 1838 | if (ptr->flags & IFF_PORTSEL) { | 1838 | if (ptr->flags & IFF_PORTSEL) { |
| 1839 | printf(_("Media:%s"), if_port_text[ptr->map.port] /* [0] */); | 1839 | printf(_("Media:%s"), if_port_text[ptr->map.port] /* [0] */); |
diff --git a/networking/route.c b/networking/route.c index 59c756408..8ae0da182 100644 --- a/networking/route.c +++ b/networking/route.c | |||
| @@ -166,7 +166,7 @@ static int kw_lookup(const char *kwtbl, char ***pargs) | |||
| 166 | static void INET_setroute(int action, char **args) | 166 | static void INET_setroute(int action, char **args) |
| 167 | { | 167 | { |
| 168 | struct rtentry rt; | 168 | struct rtentry rt; |
| 169 | const char *netmask; | 169 | const char *netmask = NULL; |
| 170 | int skfd, isnet, xflag; | 170 | int skfd, isnet, xflag; |
| 171 | 171 | ||
| 172 | assert((action == RTACTION_ADD) || (action == RTACTION_DEL)); | 172 | assert((action == RTACTION_ADD) || (action == RTACTION_DEL)); |
diff --git a/networking/telnet.c b/networking/telnet.c index d9e66e5d3..05c7786ab 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
| @@ -204,7 +204,7 @@ static void handlenetoutput(int len) | |||
| 204 | */ | 204 | */ |
| 205 | 205 | ||
| 206 | int i, j; | 206 | int i, j; |
| 207 | byte * p = G.buf; | 207 | byte * p = (byte*)G.buf; |
| 208 | byte outbuf[4*DATABUFSIZE]; | 208 | byte outbuf[4*DATABUFSIZE]; |
| 209 | 209 | ||
| 210 | for (i = len, j = 0; i > 0; i--, p++) | 210 | for (i = len, j = 0; i > 0; i--, p++) |
diff --git a/networking/telnetd.c b/networking/telnetd.c index 73303a20a..8943b2e3b 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
| @@ -131,7 +131,7 @@ static struct tsession *sessions; | |||
| 131 | */ | 131 | */ |
| 132 | static char * | 132 | static char * |
| 133 | remove_iacs(struct tsession *ts, int *pnum_totty) { | 133 | remove_iacs(struct tsession *ts, int *pnum_totty) { |
| 134 | unsigned char *ptr0 = ts->buf1 + ts->wridx1; | 134 | unsigned char *ptr0 = (unsigned char *)ts->buf1 + ts->wridx1; |
| 135 | unsigned char *ptr = ptr0; | 135 | unsigned char *ptr = ptr0; |
| 136 | unsigned char *totty = ptr; | 136 | unsigned char *totty = ptr; |
| 137 | unsigned char *end = ptr + MIN(BUFSIZE - ts->wridx1, ts->size1); | 137 | unsigned char *end = ptr + MIN(BUFSIZE - ts->wridx1, ts->size1); |
diff --git a/networking/traceroute.c b/networking/traceroute.c index b6252ad3e..95aa290a1 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
| @@ -293,7 +293,7 @@ struct IFADDRLIST { | |||
| 293 | static const char route[] = "/proc/net/route"; | 293 | static const char route[] = "/proc/net/route"; |
| 294 | 294 | ||
| 295 | /* last inbound (icmp) packet */ | 295 | /* last inbound (icmp) packet */ |
| 296 | static u_char packet[512] __attribute__((align (32))); | 296 | static u_char packet[512] __attribute__((aligned (32))); |
| 297 | 297 | ||
| 298 | static struct ip *outip; /* last output (udp) packet */ | 298 | static struct ip *outip; /* last output (udp) packet */ |
| 299 | static struct udphdr *outudp; /* last output (udp) packet */ | 299 | static struct udphdr *outudp; /* last output (udp) packet */ |
| @@ -371,7 +371,7 @@ ifaddrlist(struct IFADDRLIST **ipaddrp) | |||
| 371 | if (errno == EINVAL) | 371 | if (errno == EINVAL) |
| 372 | bb_error_msg_and_die( | 372 | bb_error_msg_and_die( |
| 373 | "SIOCGIFCONF: ifreq struct too small (%d bytes)", | 373 | "SIOCGIFCONF: ifreq struct too small (%d bytes)", |
| 374 | sizeof(ibuf)); | 374 | (int)sizeof(ibuf)); |
| 375 | else | 375 | else |
| 376 | bb_perror_msg_and_die("SIOCGIFCONF"); | 376 | bb_perror_msg_and_die("SIOCGIFCONF"); |
| 377 | } | 377 | } |
diff --git a/networking/wget.c b/networking/wget.c index 9c7ed9f1d..6c6a8a7cf 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
| @@ -332,11 +332,11 @@ int wget_main(int argc, char **argv) | |||
| 332 | #ifdef CONFIG_FEATURE_WGET_AUTHENTICATION | 332 | #ifdef CONFIG_FEATURE_WGET_AUTHENTICATION |
| 333 | if (target.user) { | 333 | if (target.user) { |
| 334 | fprintf(sfp, "Authorization: Basic %s\r\n", | 334 | fprintf(sfp, "Authorization: Basic %s\r\n", |
| 335 | base64enc(target.user, buf, sizeof(buf))); | 335 | base64enc((unsigned char*)target.user, buf, sizeof(buf))); |
| 336 | } | 336 | } |
| 337 | if (use_proxy && server.user) { | 337 | if (use_proxy && server.user) { |
| 338 | fprintf(sfp, "Proxy-Authorization: Basic %s\r\n", | 338 | fprintf(sfp, "Proxy-Authorization: Basic %s\r\n", |
| 339 | base64enc(server.user, buf, sizeof(buf))); | 339 | base64enc((unsigned char*)server.user, buf, sizeof(buf))); |
| 340 | } | 340 | } |
| 341 | #endif | 341 | #endif |
| 342 | 342 | ||
diff --git a/networking/zcip.c b/networking/zcip.c index b64e37c58..11b2db526 100644 --- a/networking/zcip.c +++ b/networking/zcip.c | |||
| @@ -314,7 +314,7 @@ fail: | |||
| 314 | goto fail; | 314 | goto fail; |
| 315 | } else { | 315 | } else { |
| 316 | struct ifreq ifr; | 316 | struct ifreq ifr; |
| 317 | short seed[3]; | 317 | unsigned short seed[3]; |
| 318 | 318 | ||
| 319 | // get the interface's ethernet address | 319 | // get the interface's ethernet address |
| 320 | memset(&ifr, 0, sizeof (ifr)); | 320 | memset(&ifr, 0, sizeof (ifr)); |
