Invalid casting seems to confuse the ABI generator and results in
illegal instruction faults when the unit tests is run.
The class API is already const-correct so there is no need for the cast
to occur, and it should not be done on a non-pointer type anyway.
Also, fixes a missing "struct" type identifier found along the way.
}
void
-Ip::Address::getInAddr(in6_addr &buf) const
+Ip::Address::getInAddr(struct in6_addr &buf) const
{
memcpy(&buf, &mSocketAddr_.sin6_addr, sizeof(struct in6_addr));
}
Ip::Address::getInAddr(struct in_addr &buf) const
{
if ( isIPv4() ) {
- map6to4((const in6_addr)mSocketAddr_.sin6_addr, buf);
+ map6to4(mSocketAddr_.sin6_addr, buf);
return true;
}
insock.sin_len = sizeof(struct sockaddr_in);
#endif
- Ip::Address anIPA((const struct sockaddr_in)insock);
+ Ip::Address anIPA(insock);
/* test stored values */
CPPUNIT_ASSERT( !anIPA.isAnyAddr() );