From e30ee8063d9e7b3471c9bbb197418d792d8fb468 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 20 Feb 2015 16:05:53 +0100 Subject: UDPEndpointImpl: Fixed clang warnings. --- src/OSSupport/UDPEndpointImpl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OSSupport/UDPEndpointImpl.cpp b/src/OSSupport/UDPEndpointImpl.cpp index c5190bcf6..ece521ab8 100644 --- a/src/OSSupport/UDPEndpointImpl.cpp +++ b/src/OSSupport/UDPEndpointImpl.cpp @@ -554,10 +554,10 @@ void cUDPEndpointImpl::Callback(evutil_socket_t a_Socket, short a_What) { // Receive datagram from the socket: char buf[64 KiB]; - int buflen = static_cast(sizeof(buf)); + socklen_t buflen = static_cast(sizeof(buf)); sockaddr_storage sa; socklen_t salen = static_cast(sizeof(sa)); - int len = recvfrom(a_Socket, buf, buflen, 0, reinterpret_cast(&sa), &salen); + auto len = recvfrom(a_Socket, buf, buflen, 0, reinterpret_cast(&sa), &salen); if (len >= 0) { // Convert the remote IP address to a string: @@ -586,7 +586,7 @@ void cUDPEndpointImpl::Callback(evutil_socket_t a_Socket, short a_What) } // Call the callback: - m_Callbacks.OnReceivedData(buf, len, RemoteHost, RemotePort); + m_Callbacks.OnReceivedData(buf, static_cast(len), RemoteHost, RemotePort); } } } -- cgit v1.2.3