1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Fixed compiler warnings.

This commit is contained in:
Till Rathmann
2018-08-01 14:07:30 +02:00
parent d1dd1d664f
commit 37d5736bf5
10 changed files with 56 additions and 27 deletions
+4 -4
View File
@@ -86,7 +86,7 @@ bool Socket::Connect( const char* addr, const char* port )
hints.ai_socktype = SOCK_STREAM;
if( getaddrinfo( addr, port, &hints, &res ) != 0 ) return false;
int sock;
int sock = 0;
for( ptr = res; ptr; ptr = ptr->ai_next )
{
if( ( sock = socket( ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol ) ) == -1 ) continue;
@@ -174,7 +174,7 @@ int Socket::Recv( void* _buf, int len, const timeval* tv )
fd_set fds;
FD_ZERO( &fds );
FD_SET( m_sock, &fds );
FD_SET( static_cast<unsigned int>(m_sock), &fds );
#ifndef _WIN32
timeval _tv = *tv;
@@ -231,7 +231,7 @@ bool Socket::HasData()
fd_set fds;
FD_ZERO( &fds );
FD_SET( m_sock, &fds );
FD_SET( static_cast<unsigned int>(m_sock), &fds );
return select( m_sock+1, &fds, nullptr, nullptr, &tv ) > 0;
}
@@ -287,7 +287,7 @@ Socket* ListenSocket::Accept()
fd_set fds;
FD_ZERO( &fds );
FD_SET( m_sock, &fds );
FD_SET( static_cast<unsigned int>(m_sock), &fds );
select( m_sock+1, &fds, nullptr, nullptr, &tv );
if( FD_ISSET( m_sock, &fds ) )