2
0
mirror of https://github.com/boostorg/asio.git synced 2026-01-19 04:02:09 +00:00

Fix compiler warnings with MSVC8.

[SVN r34739]
This commit is contained in:
Christopher Kohlhoff
2006-07-26 11:19:21 +00:00
parent 1b337d8054
commit f7e92ba296

View File

@@ -455,7 +455,7 @@ inline const char* inet_ntop(int af, const void* src, char* dest, size_t length,
memcpy(&ipv6_address->sin6_addr, src, sizeof(in6_addr_type));
}
DWORD string_length = length;
DWORD string_length = static_cast<DWORD>(length);
int result = error_wrapper(::WSAAddressToStringA(
reinterpret_cast<sockaddr*>(&address),
address_length, 0, dest, &string_length));
@@ -1378,8 +1378,9 @@ inline int getnameinfo_emulation(const socket_addr_type* sa,
hostent hent;
char hbuf[8192] = "";
int herr = 0;
hostent* hptr = socket_ops::gethostbyaddr(addr, addr_len,
sa->sa_family, &hent, hbuf, sizeof(hbuf), &herr);
hostent* hptr = socket_ops::gethostbyaddr(addr,
static_cast<int>(addr_len), sa->sa_family,
&hent, hbuf, sizeof(hbuf), &herr);
if (hptr && hptr->h_name && hptr->h_name[0] != '\0')
{
if (flags & NI_NOFQDN)