diff options
author | Eric Andersen | 2006-01-30 22:30:41 +0000 |
---|---|---|
committer | Eric Andersen | 2006-01-30 22:30:41 +0000 |
commit | 0cb6f35c33a2a3fd390aaa36da72e0600f205918 (patch) | |
tree | 6f685077a27f04869b4f152cbe4287c023554afb /networking | |
parent | 5e678873f9ff7c95d43b278feee547ce989b3b20 (diff) | |
download | busybox-0cb6f35c33a2a3fd390aaa36da72e0600f205918.zip busybox-0cb6f35c33a2a3fd390aaa36da72e0600f205918.tar.gz |
fix up annoying signed/unsigned and mixed type errors
Diffstat (limited to 'networking')
-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 95ca1ed..b66dbff 100644 --- a/networking/arping.c +++ b/networking/arping.c @@ -404,7 +404,7 @@ int arping_main(int argc, char **argv) } } else if (!dad) { int on = 1; - int alen = sizeof(saddr); + socklen_t alen = sizeof(saddr); saddr.sin_port = htons(1025); saddr.sin_addr = dst; @@ -437,7 +437,7 @@ int arping_main(int argc, char **argv) } { - int alen = sizeof(me); + socklen_t alen = sizeof(me); if (getsockname(s, (struct sockaddr *) &me, &alen) == -1) { bb_error_msg("getsockname"); @@ -479,9 +479,9 @@ int arping_main(int argc, char **argv) while (1) { sigset_t sset, osset; - char packet[4096]; + unsigned char packet[4096]; struct sockaddr_ll from; - int alen = sizeof(from); + socklen_t alen = sizeof(from); int cc; if ((cc = recvfrom(s, packet, sizeof(packet), 0, diff --git a/networking/httpd.c b/networking/httpd.c index c00f3e4..b44adf7 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -123,8 +123,10 @@ static const char home[] = "./"; #ifdef CONFIG_LFS # define cont_l_fmt "%lld" +# define cont_l_type (long long) #else # define cont_l_fmt "%ld" +# define cont_l_type (long) #endif #define TIMEOUT 60 @@ -1028,7 +1030,7 @@ static int sendHeaders(HttpResponseNum responseNum) if (config->ContentLength != -1) { /* file */ strftime(timeStr, sizeof(timeStr), RFC1123FMT, gmtime(&config->last_mod)); len += sprintf(buf+len, "Last-Modified: %s\r\n%s " cont_l_fmt "\r\n", - timeStr, Content_length, config->ContentLength); + timeStr, Content_length, cont_l_type config->ContentLength); } strcat(buf, "\r\n"); len += 2; diff --git a/networking/interface.c b/networking/interface.c index ad6c40f..b2c746b 100644 --- a/networking/interface.c +++ b/networking/interface.c @@ -501,7 +501,7 @@ static char *UNSPEC_sprint(struct sockaddr *sap, int numeric) if (sap->sa_family == 0xFFFF || sap->sa_family == 0) return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf)); - return (UNSPEC_print(sap->sa_data)); + return (UNSPEC_print((unsigned char *)sap->sa_data)); } static struct aftype unspec_aftype = { @@ -1833,7 +1833,7 @@ static void ife_print(struct interface *ptr) hardware address if it's null. */ if (hw->print != NULL && (!(hw_null_address(hw, ptr->hwaddr) && hw->suppress_null_addr))) - printf(_("HWaddr %s "), hw->print(ptr->hwaddr)); + printf(_("HWaddr %s "), hw->print((unsigned char *)ptr->hwaddr)); #ifdef IFF_PORTSEL if (ptr->flags & IFF_PORTSEL) { printf(_("Media:%s"), if_port_text[ptr->map.port] /* [0] */); diff --git a/networking/route.c b/networking/route.c index 59c7564..8ae0da1 100644 --- a/networking/route.c +++ b/networking/route.c @@ -166,7 +166,7 @@ static int kw_lookup(const char *kwtbl, char ***pargs) static void INET_setroute(int action, char **args) { struct rtentry rt; - const char *netmask; + const char *netmask = NULL; int skfd, isnet, xflag; assert((action == RTACTION_ADD) || (action == RTACTION_DEL)); diff --git a/networking/telnet.c b/networking/telnet.c index d9e66e5..05c7786 100644 --- a/networking/telnet.c +++ b/networking/telnet.c @@ -204,7 +204,7 @@ static void handlenetoutput(int len) */ int i, j; - byte * p = G.buf; + byte * p = (byte*)G.buf; byte outbuf[4*DATABUFSIZE]; for (i = len, j = 0; i > 0; i--, p++) diff --git a/networking/telnetd.c b/networking/telnetd.c index 73303a2..8943b2e 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c @@ -131,7 +131,7 @@ static struct tsession *sessions; */ static char * remove_iacs(struct tsession *ts, int *pnum_totty) { - unsigned char *ptr0 = ts->buf1 + ts->wridx1; + unsigned char *ptr0 = (unsigned char *)ts->buf1 + ts->wridx1; unsigned char *ptr = ptr0; unsigned char *totty = ptr; unsigned char *end = ptr + MIN(BUFSIZE - ts->wridx1, ts->size1); diff --git a/networking/traceroute.c b/networking/traceroute.c index b6252ad..95aa290 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c @@ -293,7 +293,7 @@ struct IFADDRLIST { static const char route[] = "/proc/net/route"; /* last inbound (icmp) packet */ -static u_char packet[512] __attribute__((align (32))); +static u_char packet[512] __attribute__((aligned (32))); static struct ip *outip; /* last output (udp) packet */ static struct udphdr *outudp; /* last output (udp) packet */ @@ -371,7 +371,7 @@ ifaddrlist(struct IFADDRLIST **ipaddrp) if (errno == EINVAL) bb_error_msg_and_die( "SIOCGIFCONF: ifreq struct too small (%d bytes)", - sizeof(ibuf)); + (int)sizeof(ibuf)); else bb_perror_msg_and_die("SIOCGIFCONF"); } diff --git a/networking/wget.c b/networking/wget.c index 9c7ed9f..6c6a8a7 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -332,11 +332,11 @@ int wget_main(int argc, char **argv) #ifdef CONFIG_FEATURE_WGET_AUTHENTICATION if (target.user) { fprintf(sfp, "Authorization: Basic %s\r\n", - base64enc(target.user, buf, sizeof(buf))); + base64enc((unsigned char*)target.user, buf, sizeof(buf))); } if (use_proxy && server.user) { fprintf(sfp, "Proxy-Authorization: Basic %s\r\n", - base64enc(server.user, buf, sizeof(buf))); + base64enc((unsigned char*)server.user, buf, sizeof(buf))); } #endif diff --git a/networking/zcip.c b/networking/zcip.c index b64e37c..11b2db5 100644 --- a/networking/zcip.c +++ b/networking/zcip.c @@ -314,7 +314,7 @@ fail: goto fail; } else { struct ifreq ifr; - short seed[3]; + unsigned short seed[3]; // get the interface's ethernet address memset(&ifr, 0, sizeof (ifr)); |