Fix warnings on g++ 4.1.2.

This commit is contained in:
chris_kohlhoff 2007-02-19 01:46:31 +00:00
parent 96eab3f65e
commit 567bad6a99

View File

@ -166,8 +166,8 @@ public:
{
if (!is_v4_mapped() && !is_v4_compatible())
throw std::bad_cast();
address_v4::bytes_type v4_bytes = { addr_.s6_addr[12],
addr_.s6_addr[13], addr_.s6_addr[14], addr_.s6_addr[15] };
address_v4::bytes_type v4_bytes = { { addr_.s6_addr[12],
addr_.s6_addr[13], addr_.s6_addr[14], addr_.s6_addr[15] } };
return address_v4(v4_bytes);
}
@ -345,8 +345,8 @@ public:
static address_v6 v4_mapped(const address_v4& addr)
{
address_v4::bytes_type v4_bytes = addr.to_bytes();
bytes_type v6_bytes = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF,
v4_bytes[0], v4_bytes[1], v4_bytes[2], v4_bytes[3] };
bytes_type v6_bytes = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF,
v4_bytes[0], v4_bytes[1], v4_bytes[2], v4_bytes[3] } };
return address_v6(v6_bytes);
}
@ -354,8 +354,8 @@ public:
static address_v6 v4_compatible(const address_v4& addr)
{
address_v4::bytes_type v4_bytes = addr.to_bytes();
bytes_type v6_bytes = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
v4_bytes[0], v4_bytes[1], v4_bytes[2], v4_bytes[3] };
bytes_type v6_bytes = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
v4_bytes[0], v4_bytes[1], v4_bytes[2], v4_bytes[3] } };
return address_v6(v6_bytes);
}