diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libatm/Makefile | 2 | ||||
-rw-r--r-- | lib/libatm/ioctl_subr.c | 8 | ||||
-rw-r--r-- | lib/libatm/ip_addr.c | 3 | ||||
-rw-r--r-- | lib/libatm/ip_checksum.c | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/lib/libatm/Makefile b/lib/libatm/Makefile index 1fc3ed7..e2bc119 100644 --- a/lib/libatm/Makefile +++ b/lib/libatm/Makefile @@ -33,6 +33,6 @@ INCS= libatm.h LDADD+= -lmd DPADD+= ${LIBMD} -WARNS?= 3 +WARNS?= 6 .include <bsd.lib.mk> diff --git a/lib/libatm/ioctl_subr.c b/lib/libatm/ioctl_subr.c index bc600f2..d5cc799 100644 --- a/lib/libatm/ioctl_subr.c +++ b/lib/libatm/ioctl_subr.c @@ -172,7 +172,7 @@ get_vcc_info(intf, vccp) /* * Return a pointer to the VCC info and its length */ - *vccp = (struct air_vcc_rsp *) air.air_buf_addr; + *vccp = (struct air_vcc_rsp *)(void *)air.air_buf_addr; return(buf_len); } @@ -226,7 +226,7 @@ get_subnet_mask(intf, mask) /* * Give the answer back to the caller */ - ip_mask = (struct sockaddr_in *)&req.ifr_addr; + ip_mask = (struct sockaddr_in *)(void *)&req.ifr_addr; *mask = *ip_mask; mask->sin_family = AF_INET; @@ -392,7 +392,7 @@ get_cfg_info ( intf, cfgp ) /* * Return a pointer to the Config info and its length */ - *cfgp = (struct air_cfg_rsp *) air.air_buf_addr; + *cfgp = (struct air_cfg_rsp *)(void *)air.air_buf_addr; return ( buf_len ); } @@ -430,7 +430,7 @@ get_intf_info ( intf, intp ) /* * Return a pointer to the Physical Interface info and its length */ - *intp = (struct air_int_rsp *) air.air_buf_addr; + *intp = (struct air_int_rsp *)(void *)air.air_buf_addr; return ( buf_len ); } diff --git a/lib/libatm/ip_addr.c b/lib/libatm/ip_addr.c index df10acb..42f734a 100644 --- a/lib/libatm/ip_addr.c +++ b/lib/libatm/ip_addr.c @@ -96,7 +96,8 @@ get_ip_addr(p) ip_host->h_addrtype != AF_INET) { return((struct sockaddr_in *)0); } - s.sin_addr.s_addr = *(u_long *)ip_host->h_addr_list[0]; + memcpy(&s.sin_addr.s_addr, ip_host->h_addr_list[0], + sizeof(s.sin_addr.s_addr)); } return(&s); } diff --git a/lib/libatm/ip_checksum.c b/lib/libatm/ip_checksum.c index e644977..71ef7b4 100644 --- a/lib/libatm/ip_checksum.c +++ b/lib/libatm/ip_checksum.c @@ -77,7 +77,7 @@ ip_checksum(addr, count) while( count > 1 ) { /* This is the inner loop */ - sum += ntohs(* (unsigned short *) addr); + sum += ntohs(* (unsigned short *)(void *)addr); addr += sizeof(unsigned short); count -= sizeof(unsigned short); } |