Make library WARNS=6 clean. The problems have been: alignment on sparc64
and one of the usual sizeof(in_addr_t) == sizeof(u_long) bugs.
This commit is contained in:
parent
ec3770a91a
commit
84ce3db3e5
@ -33,6 +33,6 @@ INCS= libatm.h
|
||||
|
||||
LDADD+= -lmd
|
||||
DPADD+= ${LIBMD}
|
||||
WARNS?= 3
|
||||
WARNS?= 6
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
@ -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 );
|
||||
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user