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:
@@ -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 ) )
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
#if defined _MSC_VER || defined __CYGWIN__ || defined _WIN32
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# ifndef NOMINMAX
|
||||
# define NOMINMAX
|
||||
# endif
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
# include <windows.h>
|
||||
#else
|
||||
|
||||
@@ -701,7 +701,7 @@ LZ4_FORCE_INLINE int LZ4_compress_generic(
|
||||
cctx->dictSize += (U32)inputSize;
|
||||
}
|
||||
cctx->currentOffset += (U32)inputSize;
|
||||
cctx->tableType = tableType;
|
||||
cctx->tableType = (U16)tableType;
|
||||
|
||||
if (inputSize<LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */
|
||||
|
||||
|
||||
@@ -596,7 +596,7 @@ LZ4_DEPRECATED("Use LZ4_resetStream() instead") LZ4LIB_API int LZ4_resetStrea
|
||||
LZ4_DEPRECATED("Use LZ4_saveDict() instead") LZ4LIB_API char* LZ4_slideInputBuffer (void* state);
|
||||
|
||||
/* Obsolete streaming decoding functions */
|
||||
LZ4_DEPRECATED("use LZ4_decompress_safe_usingDict() instead") LZ4LIB_API int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize);
|
||||
/*LZ4_DEPRECATED("use LZ4_decompress_safe_usingDict() instead")*/ LZ4LIB_API int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize);
|
||||
LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") LZ4LIB_API int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user