Merge pull request #35 from jpetso/master

Minor fixes to avoid warnings
This commit is contained in:
Arvid Norberg 2015-07-14 22:38:10 -04:00
commit 5201fe952b
4 changed files with 8 additions and 7 deletions

View File

@ -312,18 +312,15 @@ if (MSVC)
#$(SolutionDir)<toolset>msvc,<variant>release:<linkflags>/OPT:ICF=5
#$(SolutionDir)<toolset>msvc,<variant>release:<linkflags>/OPT:REF
else()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_definitions(-Wno-c++11-extensions)
add_definitions(-fcolor-diagnostics)
endif()
add_definitions(-D_FILE_OFFSET_BITS=64)
add_definitions(-DBOOST_EXCEPTION_DISABLE)
add_definitions(-DBOOST_ASIO_ENABLE_CANCELIO)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_definitions(-fcolor-diagnostics)
endif()
if (tcmalloc)
target_link_libraries(torrent-rasterbar tcmalloc)
endif()

View File

@ -1807,7 +1807,7 @@ namespace libtorrent {
char ih_hex[41];
to_hex((const char*)&info_hash[0], 20, ih_hex);
char msg[200];
snprintf(msg, sizeof(msg), "incoming dht get_peers reply: %s, peers %ld", ih_hex, m_num_peers);
snprintf(msg, sizeof(msg), "incoming dht get_peers reply: %s, peers %d", ih_hex, m_num_peers);
return msg;
}

View File

@ -13,6 +13,7 @@
// only define BOOST_ASIO_DECL if it hasn't already been defined
// or if it has been defined to an empty string
#if TORRENT_HAS_ASIO_DECL == x
#undef BOOST_ASIO_DECL
#define BOOST_ASIO_DECL BOOST_SYMBOL_EXPORT
#endif

View File

@ -278,7 +278,10 @@ done:
}
}
# else
# define _BSD_SOURCE
# undef _BSD_SOURCE
# define _BSD_SOURCE // deprecated since glibc 2.20
# undef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE
# include <sys/uio.h>
# endif
#endif