You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Mladen Turk <mt...@apache.org> on 2006/12/06 09:04:32 UTC
[Win32] multicast.c -- compile time warnings
Hi,
Enabling IPV6 gives a bunch of warnings:
multicast.c
./network_io/unix\multicast.c(206) : warning C4133: 'function' : incompatible types - from 'struct ipv6_mreq *' to 'const char *'
./network_io/unix\multicast.c(240) : warning C4133: 'function' : incompatible types - from 'unsigned int *' to 'const char *'
./network_io/unix\multicast.c(326) : warning C4133: 'function' : incompatible types - from 'unsigned int *' to 'const char *'
Now, the solution is to typecast the 4th param for setsockopt with
(const void *), like we have with ipv4.
if (sock_is_ipv4(sock)) {
...
setsockopt(sock->socketdes, IPPROTO_IP, type,
(const void *) &mip4, sizeof(mip4))
....
#if APR_HAVE_IPV6 && defined(IPV6_JOIN_GROUP) && defined(IPV6_LEAVE_GROUP)
... we have:
setsockopt(sock->socketdes, IPPROTO_IPV6, type,
&mip6, sizeof(mip6))
... it should be:
setsockopt(sock->socketdes, IPPROTO_IPV6, type,
(const void *)&mip6, sizeof(mip6))
Any objections for fixing that and backporting to 1.2 ?
Regards,
Mladen.
Re: [Win32] multicast.c -- compile time warnings
Posted by Colm MacCarthaigh <co...@stdlib.net>.
On Wed, Dec 06, 2006 at 09:04:32AM +0100, Mladen Turk wrote:
> Any objections for fixing that and backporting to 1.2 ?
+1, looks right :-)
--
Colm MacCárthaigh Public Key: colm+pgp@stdlib.net