summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2006-08-30 17:20:33 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2006-08-30 17:20:33 +0000
commitae5a79c349615f239308a38dc2023d0c58980b7a (patch)
treeefe76b15a2e48fddec57f6a128bd0dc4913c2059 /cpukit
parent2006-08-30 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-ae5a79c349615f239308a38dc2023d0c58980b7a.tar.bz2
2006-08-30 Joel Sherrill <joel@OARcorp.com>
* libcsupport/include/sys/ioccom.h, libnetworking/kern/uipc_socket2.c, libnetworking/net/ethernet.h, libnetworking/net/if.h, libnetworking/net/if_ethersubr.c, libnetworking/net/if_ppp.c, libnetworking/net/if_pppvar.h, libnetworking/net/ppp_tty.c, libnetworking/net/pppcompress.c, libnetworking/net/slcompress.c, libnetworking/netinet/in.h, libnetworking/netinet/ip_icmp.c, libnetworking/netinet/tcp.h, libnetworking/netinet/tcp_seq.h, libnetworking/sys/protosw.h, libnetworking/sys/socketvar.h: Remove warnings. Most of the warnings were 16/32 bit integer sizing issues. Some constants had L appended, some had casts add, some types were changed to reflect a bit width requirement.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog14
-rw-r--r--cpukit/libcsupport/include/sys/ioccom.h2
-rw-r--r--cpukit/libnetworking/kern/uipc_socket2.c2
-rw-r--r--cpukit/libnetworking/net/ethernet.h4
-rw-r--r--cpukit/libnetworking/net/if.h3
-rw-r--r--cpukit/libnetworking/net/if_ethersubr.c2
-rw-r--r--cpukit/libnetworking/net/if_ppp.c2
-rw-r--r--cpukit/libnetworking/net/if_pppvar.h2
-rw-r--r--cpukit/libnetworking/net/ppp_tty.c8
-rw-r--r--cpukit/libnetworking/net/pppcompress.c2
-rw-r--r--cpukit/libnetworking/net/slcompress.c2
-rw-r--r--cpukit/libnetworking/netinet/in.h2
-rw-r--r--cpukit/libnetworking/netinet/ip_icmp.c2
-rw-r--r--cpukit/libnetworking/netinet/tcp.h29
-rw-r--r--cpukit/libnetworking/netinet/tcp_seq.h6
-rw-r--r--cpukit/libnetworking/sys/protosw.h4
-rw-r--r--cpukit/libnetworking/sys/socketvar.h2
17 files changed, 53 insertions, 35 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 7345d134fa..0b360a93b4 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,19 @@
2006-08-30 Joel Sherrill <joel@OARcorp.com>
+ * libcsupport/include/sys/ioccom.h, libnetworking/kern/uipc_socket2.c,
+ libnetworking/net/ethernet.h, libnetworking/net/if.h,
+ libnetworking/net/if_ethersubr.c, libnetworking/net/if_ppp.c,
+ libnetworking/net/if_pppvar.h, libnetworking/net/ppp_tty.c,
+ libnetworking/net/pppcompress.c, libnetworking/net/slcompress.c,
+ libnetworking/netinet/in.h, libnetworking/netinet/ip_icmp.c,
+ libnetworking/netinet/tcp.h, libnetworking/netinet/tcp_seq.h,
+ libnetworking/sys/protosw.h, libnetworking/sys/socketvar.h: Remove
+ warnings. Most of the warnings were 16/32 bit integer sizing issues.
+ Some constants had L appended, some had casts add, some types were
+ changed to reflect a bit width requirement.
+
+2006-08-30 Joel Sherrill <joel@OARcorp.com>
+
* libmisc/cpuuse/cpuuse.c, libmisc/monitor/mon-command.c,
libmisc/monitor/mon-driver.c, libmisc/monitor/mon-symbols.c,
libmisc/rtmonuse/rtmonuse.c, libmisc/stackchk/check.c,
diff --git a/cpukit/libcsupport/include/sys/ioccom.h b/cpukit/libcsupport/include/sys/ioccom.h
index c6437856f2..9a646c3130 100644
--- a/cpukit/libcsupport/include/sys/ioccom.h
+++ b/cpukit/libcsupport/include/sys/ioccom.h
@@ -56,7 +56,7 @@
#define IOC_DIRMASK 0xe0000000 /* mask for IN/OUT/VOID */
#define _IOC(inout,group,num,len) \
- ((u_int32_t)inout | \
+ (u_int32_t) ((u_int32_t)inout | \
(u_int32_t) ((u_int32_t)((u_int32_t)len & IOCPARM_MASK) << 16) | \
(u_int32_t)((group) << 8) | \
(u_int32_t)(num))
diff --git a/cpukit/libnetworking/kern/uipc_socket2.c b/cpukit/libnetworking/kern/uipc_socket2.c
index ab1ee2439f..5d7e11c1bc 100644
--- a/cpukit/libnetworking/kern/uipc_socket2.c
+++ b/cpukit/libnetworking/kern/uipc_socket2.c
@@ -166,7 +166,7 @@ sodropablereq(head)
register struct socket *head;
{
register struct socket *so;
- unsigned int i, j, qlen, m;
+ uint32_t i, j, qlen, m;
static int rnd;
static long old_mono_secs;
diff --git a/cpukit/libnetworking/net/ethernet.h b/cpukit/libnetworking/net/ethernet.h
index a744308f09..85f288a231 100644
--- a/cpukit/libnetworking/net/ethernet.h
+++ b/cpukit/libnetworking/net/ethernet.h
@@ -13,7 +13,7 @@
#define _NET_ETHERNET_H_
/*
- * Somce basic Ethernet constants.
+ * Some basic Ethernet constants.
*/
#define ETHER_ADDR_LEN 6 /* length of an Ethernet address */
#define ETHER_TYPE_LEN 2 /* length of the Ethernet type field */
@@ -360,7 +360,7 @@ extern uint32_t ether_crc32_be(const uint8_t *, size_t);
extern void ether_demux(struct ifnet *, struct mbuf *);
extern void ether_ifattach(struct ifnet *);
extern void ether_ifdetach(struct ifnet *);
-extern int ether_ioctl(struct ifnet *, int, caddr_t);
+extern int ether_ioctl(struct ifnet *, int32_t, caddr_t);
extern void ether_input (struct ifnet *, struct ether_header *, struct mbuf *);
extern int ether_output(struct ifnet *,
struct mbuf *, struct sockaddr *, struct rtentry *);
diff --git a/cpukit/libnetworking/net/if.h b/cpukit/libnetworking/net/if.h
index 8f7b6d95ba..45d9e0bd7f 100644
--- a/cpukit/libnetworking/net/if.h
+++ b/cpukit/libnetworking/net/if.h
@@ -47,6 +47,7 @@
#ifndef __BSD_VISIBLE
#define __BSD_VISIBLE 1
#endif
+#include <inttypes.h>
#endif
#ifdef _KERNEL
@@ -210,7 +211,7 @@ struct ifreq {
struct sockaddr ifru_dstaddr;
struct sockaddr ifru_broadaddr;
short ifru_flags[2];
- int ifru_metric;
+ int32_t ifru_metric;
int ifru_mtu;
int ifru_phys;
int ifru_media;
diff --git a/cpukit/libnetworking/net/if_ethersubr.c b/cpukit/libnetworking/net/if_ethersubr.c
index 7f5d3867d9..31e9a88ac5 100644
--- a/cpukit/libnetworking/net/if_ethersubr.c
+++ b/cpukit/libnetworking/net/if_ethersubr.c
@@ -825,7 +825,7 @@ ether_crc32_be(const uint8_t *buf, size_t len)
}
int
-ether_ioctl(struct ifnet *ifp, int command, caddr_t data)
+ether_ioctl(struct ifnet *ifp, int32_t command, caddr_t data)
{
struct ifaddr *ifa = (struct ifaddr *) data;
struct ifreq *ifr = (struct ifreq *) data;
diff --git a/cpukit/libnetworking/net/if_ppp.c b/cpukit/libnetworking/net/if_ppp.c
index 3c69511acb..f0a8bb69bb 100644
--- a/cpukit/libnetworking/net/if_ppp.c
+++ b/cpukit/libnetworking/net/if_ppp.c
@@ -619,7 +619,7 @@ pppdealloc(sc)
int
pppioctl(sc, cmd, data, flag, p)
struct ppp_softc *sc;
- int cmd;
+ int32_t cmd;
caddr_t data;
int flag;
struct proc *p;
diff --git a/cpukit/libnetworking/net/if_pppvar.h b/cpukit/libnetworking/net/if_pppvar.h
index aa109b855b..cffa25c693 100644
--- a/cpukit/libnetworking/net/if_pppvar.h
+++ b/cpukit/libnetworking/net/if_pppvar.h
@@ -118,7 +118,7 @@ struct ppp_softc *pppalloc(pid_t pid);
void pppdealloc(struct ppp_softc *sc);
int pppoutput(struct ifnet *, struct mbuf *,
struct sockaddr *, struct rtentry *);
-int pppioctl(struct ppp_softc *sc, int cmd, caddr_t data,
+int pppioctl(struct ppp_softc *sc, int32_t cmd, caddr_t data,
int flag, struct proc *p);
struct mbuf *ppp_dequeue(struct ppp_softc *sc);
u_short pppfcs(u_short fcs, u_char *cp, int len);
diff --git a/cpukit/libnetworking/net/ppp_tty.c b/cpukit/libnetworking/net/ppp_tty.c
index 1ce5542bde..76eea6164c 100644
--- a/cpukit/libnetworking/net/ppp_tty.c
+++ b/cpukit/libnetworking/net/ppp_tty.c
@@ -427,7 +427,7 @@ ppptioctl(struct rtems_termios_tty *tty, rtems_libio_ioctl_args_t *args)
{
/* int i; */
int error = RTEMS_SUCCESSFUL;
- int cmd = args->command;
+ int32_t cmd = args->command;
caddr_t data = args->buffer;
struct ppp_softc *sc = tty->t_sc;
@@ -728,9 +728,9 @@ pppallocmbuf(struct ppp_softc *sc, struct mbuf **mp)
/*
* tty interface receiver interrupt.
*/
-static unsigned paritytab[8] = {
- 0x96696996, 0x69969669, 0x69969669, 0x96696996,
- 0x69969669, 0x96696996, 0x96696996, 0x69969669
+static uint32_t paritytab[8] = {
+ 0x96696996L, 0x69969669L, 0x69969669L, 0x96696996L,
+ 0x69969669L, 0x96696996L, 0x96696996L, 0x69969669L
};
int
diff --git a/cpukit/libnetworking/net/pppcompress.c b/cpukit/libnetworking/net/pppcompress.c
index b87c662c18..5c924e0446 100644
--- a/cpukit/libnetworking/net/pppcompress.c
+++ b/cpukit/libnetworking/net/pppcompress.c
@@ -456,7 +456,7 @@ vj_uncompress_tcp_core(buf, buflen, total_len, type, comp, hdrp, hlenp)
u_int *hlenp;
{
register u_char *cp;
- register u_int hlen, changes;
+ register uint32_t hlen, changes;
register struct tcphdr *th;
register struct cstate *cs;
register struct ip *ip;
diff --git a/cpukit/libnetworking/net/slcompress.c b/cpukit/libnetworking/net/slcompress.c
index 11b4678c0a..6e2005aa06 100644
--- a/cpukit/libnetworking/net/slcompress.c
+++ b/cpukit/libnetworking/net/slcompress.c
@@ -474,7 +474,7 @@ sl_uncompress_tcp_core(buf, buflen, total_len, type, comp, hdrp, hlenp)
u_int *hlenp;
{
register u_char *cp;
- register u_int hlen, changes;
+ register uint32_t hlen, changes;
register struct tcphdr *th;
register struct cstate *cs;
register struct ip *ip;
diff --git a/cpukit/libnetworking/netinet/in.h b/cpukit/libnetworking/netinet/in.h
index 48e53e9496..d3e0654295 100644
--- a/cpukit/libnetworking/netinet/in.h
+++ b/cpukit/libnetworking/netinet/in.h
@@ -299,7 +299,7 @@ struct sockaddr_in {
#define INADDR_ALLRTRS_GROUP (u_int32_t)0xe0000002 /* 224.0.0.2 */
#define INADDR_MAX_LOCAL_GROUP (u_int32_t)0xe00000ff /* 224.0.0.255 */
-#define IN_LOOPBACKNET 127 /* official! */
+#define IN_LOOPBACKNET (u_int32_t)127 /* official! */
/*
* Structure used to describe IP options.
diff --git a/cpukit/libnetworking/netinet/ip_icmp.c b/cpukit/libnetworking/netinet/ip_icmp.c
index 26d9b8b491..92223751e2 100644
--- a/cpukit/libnetworking/netinet/ip_icmp.c
+++ b/cpukit/libnetworking/netinet/ip_icmp.c
@@ -699,7 +699,7 @@ iptime()
u_long t;
microtime(&atv);
- t = (atv.tv_sec % (24*60*60)) * 1000 + atv.tv_usec / 1000;
+ t = (atv.tv_sec % (24L*60L*60L)) * 1000L + atv.tv_usec / 1000L;
return (htonl(t));
}
diff --git a/cpukit/libnetworking/netinet/tcp.h b/cpukit/libnetworking/netinet/tcp.h
index a8c24f572b..96e28710c1 100644
--- a/cpukit/libnetworking/netinet/tcp.h
+++ b/cpukit/libnetworking/netinet/tcp.h
@@ -81,20 +81,23 @@ struct tcphdr {
u_short th_urp; /* urgent pointer */
};
-#define TCPOPT_EOL 0
-#define TCPOPT_NOP 1
-#define TCPOPT_MAXSEG 2
-#define TCPOLEN_MAXSEG 4
-#define TCPOPT_WINDOW 3
-#define TCPOLEN_WINDOW 3
-#define TCPOPT_SACK_PERMITTED 4 /* Experimental */
-#define TCPOLEN_SACK_PERMITTED 2
-#define TCPOPT_SACK 5 /* Experimental */
-#define TCPOPT_TIMESTAMP 8
-#define TCPOLEN_TIMESTAMP 10
-#define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */
+#define TCPOPT_EOL 0L
+#define TCPOPT_NOP 1L
+#define TCPOPT_MAXSEG 2L
+#define TCPOLEN_MAXSEG 4L
+#define TCPOPT_WINDOW 3L
+#define TCPOLEN_WINDOW 3L
+#define TCPOPT_SACK_PERMITTED 4L /* Experimental */
+#define TCPOLEN_SACK_PERMITTED 2L
+#define TCPOPT_SACK 5L /* Experimental */
+#define TCPOPT_TIMESTAMP 8L
+#define TCPOLEN_TIMESTAMP 10L
+#define TCPOLEN_TSTAMP_APPA (uint32_t)(TCPOLEN_TIMESTAMP+2) /* appendix A */
#define TCPOPT_TSTAMP_HDR \
- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
+ (uint32_t)(((uint32_t)TCPOPT_NOP<<24)| \
+ ((uint32_t)TCPOPT_NOP<<16)| \
+ ((uint32_t)TCPOPT_TIMESTAMP<<8)| \
+ ((uint32_t)TCPOLEN_TIMESTAMP))
#define TCPOPT_CC 11 /* CC options: RFC-1644 */
#define TCPOPT_CCNEW 12
diff --git a/cpukit/libnetworking/netinet/tcp_seq.h b/cpukit/libnetworking/netinet/tcp_seq.h
index ffc64c50af..01505377ba 100644
--- a/cpukit/libnetworking/netinet/tcp_seq.h
+++ b/cpukit/libnetworking/netinet/tcp_seq.h
@@ -75,7 +75,7 @@
(tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \
(tp)->iss
-#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * PR_SLOWHZ)
+#define TCP_PAWS_IDLE (uint32_t)(24L * 24L * 60L * 60L * PR_SLOWHZ)
/* timestamp wrap-around time */
#ifdef _KERNEL
@@ -91,9 +91,9 @@ extern tcp_cc tcp_ccgen; /* global connection count */
* number in the range [0-0x3ffff] that is hard to predict.
*/
#ifndef tcp_random18
-#define tcp_random18() ((random() >> 14) & 0x3ffff)
+#define tcp_random18() (((uint32_t)random() >> 14) & 0x3ffffL)
#endif
-#define TCP_ISSINCR (122*1024 + tcp_random18())
+#define TCP_ISSINCR (uint32_t)(122L*1024L + tcp_random18())
extern tcp_seq tcp_iss; /* tcp initial send seq # */
#else
diff --git a/cpukit/libnetworking/sys/protosw.h b/cpukit/libnetworking/sys/protosw.h
index 13bbc26cee..bdf17eca47 100644
--- a/cpukit/libnetworking/sys/protosw.h
+++ b/cpukit/libnetworking/sys/protosw.h
@@ -92,8 +92,8 @@ struct protosw {
struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */
};
-#define PR_SLOWHZ 2 /* 2 slow timeouts per second */
-#define PR_FASTHZ 5 /* 5 fast timeouts per second */
+#define PR_SLOWHZ 2L /* 2 slow timeouts per second */
+#define PR_FASTHZ 5L /* 5 fast timeouts per second */
/*
* Values for pr_flags.
diff --git a/cpukit/libnetworking/sys/socketvar.h b/cpukit/libnetworking/sys/socketvar.h
index 1fd0abdace..90a6185e58 100644
--- a/cpukit/libnetworking/sys/socketvar.h
+++ b/cpukit/libnetworking/sys/socketvar.h
@@ -90,7 +90,7 @@ struct socket {
void (*sb_wakeup) __P((struct socket *, caddr_t));
caddr_t sb_wakeuparg; /* arg for above */
} so_rcv, so_snd;
-#define SB_MAX (256*1024) /* default for max chars in sockbuf */
+#define SB_MAX (256L*1024L) /* default for max chars in sockbuf */
#define SB_LOCK 0x01 /* lock on data queue */
#define SB_WANT 0x02 /* someone is waiting to lock */
#define SB_WAIT 0x04 /* someone is waiting for data/space */