Commit 3a1c346e authored by scottmg's avatar scottmg Committed by Commit bot

Fix variable shadowing warnings in UDPSocketWin on VS2015

d:\src\cr3\src\net\udp\udp_socket_win.cc(330): error C2220: warning treated as error - no 'object' file generated
d:\src\cr3\src\net\udp\udp_socket_win.cc(330): warning C4457: declaration of 'address' hides function parameter
d:\src\cr3\src\net\udp\udp_socket_win.cc(319): note: see declaration of 'address'
d:\src\cr3\src\net\udp\udp_socket_win.cc(351): warning C4457: declaration of 'address' hides function parameter
d:\src\cr3\src\net\udp\udp_socket_win.cc(340): note: see declaration of 'address'

R=eroman@chromium.org
BUG=440500

Review URL: https://codereview.chromium.org/882733003

Cr-Commit-Position: refs/heads/master@{#313390}
parent 637d8310
...@@ -327,10 +327,10 @@ int UDPSocketWin::GetPeerAddress(IPEndPoint* address) const { ...@@ -327,10 +327,10 @@ int UDPSocketWin::GetPeerAddress(IPEndPoint* address) const {
SockaddrStorage storage; SockaddrStorage storage;
if (getpeername(socket_, storage.addr, &storage.addr_len)) if (getpeername(socket_, storage.addr, &storage.addr_len))
return MapSystemError(WSAGetLastError()); return MapSystemError(WSAGetLastError());
scoped_ptr<IPEndPoint> address(new IPEndPoint()); scoped_ptr<IPEndPoint> remote_address(new IPEndPoint());
if (!address->FromSockAddr(storage.addr, storage.addr_len)) if (!remote_address->FromSockAddr(storage.addr, storage.addr_len))
return ERR_ADDRESS_INVALID; return ERR_ADDRESS_INVALID;
remote_address_.reset(address.release()); remote_address_.reset(remote_address.release());
} }
*address = *remote_address_; *address = *remote_address_;
...@@ -348,10 +348,10 @@ int UDPSocketWin::GetLocalAddress(IPEndPoint* address) const { ...@@ -348,10 +348,10 @@ int UDPSocketWin::GetLocalAddress(IPEndPoint* address) const {
SockaddrStorage storage; SockaddrStorage storage;
if (getsockname(socket_, storage.addr, &storage.addr_len)) if (getsockname(socket_, storage.addr, &storage.addr_len))
return MapSystemError(WSAGetLastError()); return MapSystemError(WSAGetLastError());
scoped_ptr<IPEndPoint> address(new IPEndPoint()); scoped_ptr<IPEndPoint> local_address(new IPEndPoint());
if (!address->FromSockAddr(storage.addr, storage.addr_len)) if (!local_address->FromSockAddr(storage.addr, storage.addr_len))
return ERR_ADDRESS_INVALID; return ERR_ADDRESS_INVALID;
local_address_.reset(address.release()); local_address_.reset(local_address.release());
net_log_.AddEvent(NetLog::TYPE_UDP_LOCAL_ADDRESS, net_log_.AddEvent(NetLog::TYPE_UDP_LOCAL_ADDRESS,
CreateNetLogUDPConnectCallback(local_address_.get())); CreateNetLogUDPConnectCallback(local_address_.get()));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment