apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject [Win32] multicast.c -- compile time warnings
Date Wed, 06 Dec 2006 08:04:32 GMT
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.

Mime
View raw message