Fix "possible loss of data" warning when building for Windows 2000 targets.

This commit is contained in:
chris_kohlhoff 2008-02-02 07:34:17 +00:00
parent 8a90ce1045
commit 51f731c014

View File

@ -1824,7 +1824,8 @@ inline asio::error_code getnameinfo(const socket_addr_type* addr,
if (gni_t gni = (gni_t)::GetProcAddress(winsock_module, "getnameinfo"))
{
clear_error(ec);
int error = gni(addr, addrlen, host, static_cast<DWORD>(hostlen),
int error = gni(addr, static_cast<int>(addrlen),
host, static_cast<DWORD>(hostlen),
serv, static_cast<DWORD>(servlen), flags);
return ec = translate_addrinfo_error(error);
}