------------------------------------------------------------ revno: 12602 revision-id: squid3@treenet.co.nz-20130726124339-q1htcokoidza95pa parent: squid3@treenet.co.nz-20130726123959-7jnzt159jpdz4dvq committer: Amos Jeffries branch nick: 3.3 timestamp: Fri 2013-07-26 06:43:39 -0600 message: Make GCC 4.8 happy with libip code 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. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20130726124339-q1htcokoidza95pa # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: 15f59a6ffc8aafc84d025c884ab06372981d86ae # timestamp: 2013-07-26 12:44:01 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20130726123959-\ # 7jnzt159jpdz4dvq # # Begin patch === modified file 'src/ip/Address.cc' --- src/ip/Address.cc 2013-06-29 08:23:49 +0000 +++ src/ip/Address.cc 2013-07-26 12:43:39 +0000 @@ -1021,7 +1021,7 @@ } void -Ip::Address::GetInAddr(in6_addr &buf) const +Ip::Address::GetInAddr(struct in6_addr &buf) const { memcpy(&buf, &m_SocketAddr.sin6_addr, sizeof(struct in6_addr)); } @@ -1030,7 +1030,7 @@ Ip::Address::GetInAddr(struct in_addr &buf) const { if ( IsIPv4() ) { - Map6to4((const in6_addr)m_SocketAddr.sin6_addr, buf); + Map6to4(m_SocketAddr.sin6_addr, buf); return true; } === modified file 'src/ip/testAddress.cc' --- src/ip/testAddress.cc 2013-01-22 04:36:16 +0000 +++ src/ip/testAddress.cc 2013-07-26 12:43:39 +0000 @@ -108,7 +108,7 @@ 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() );