Fix compiler warnings in Linux build.

This commit is contained in:
Adam Ierymenko 2014-02-14 13:08:54 -08:00
parent c17082a4f8
commit 01d13c153d

View File

@ -613,11 +613,9 @@ std::set<InetAddress> EthernetTap::ips() const
case AF_INET6: {
struct sockaddr_in6 *sin = (struct sockaddr_in6 *)p->ifa_addr;
struct sockaddr_in6 *nm = (struct sockaddr_in6 *)p->ifa_netmask;
r.insert(InetAddress(sin->sin6_addr.s6_addr,16,
Utils::countBits(((const uint32_t *)(nm->sin6_addr.s6_addr))[0]) +
Utils::countBits(((const uint32_t *)(nm->sin6_addr.s6_addr))[1]) +
Utils::countBits(((const uint32_t *)(nm->sin6_addr.s6_addr))[2]) +
Utils::countBits(((const uint32_t *)(nm->sin6_addr.s6_addr))[3])));
uint32_t b[4];
memcpy(b,nm->sin6_addr.s6_addr,sizeof(b));
r.insert(InetAddress(sin->sin6_addr.s6_addr,16,Utils::countBits(b[0]) + Utils::countBits(b[1]) + Utils::countBits(b[2]) + Utils::countBits(b[3])));
} break;
}
}