forked from premiere/premiere-libtorrent
fix a few warnings and GCC build
This commit is contained in:
parent
cea9564302
commit
23536dcc42
|
@ -36,13 +36,12 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#pragma GCC diagnostic ignored "-Wsign-conversion"
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#pragma GCC diagnostic ignored "-Wswitch-enum"
|
||||
#pragma GCC diagnostic ignored "-Wcovered-switch-default"
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Wundef"
|
||||
#pragma GCC diagnostic ignored "-Wweak-vtables"
|
||||
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated"
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
|
|
|
@ -389,7 +389,10 @@ int snprintf(char* buf, int len, char const* fmt, ...)
|
|||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#if defined __cplusplus && __cplusplus >= 199711L
|
||||
// at the highest warning level, clang actually warns about functions
|
||||
// that could be marked noreturn. There seems to be versions of GCC
|
||||
// that declare being
|
||||
#if defined __clang__ && defined __cplusplus && __cplusplus >= 199711L
|
||||
#define TORRENT_NO_RETURN [[noreturn]]
|
||||
#else
|
||||
#define TORRENT_NO_RETURN
|
||||
|
|
|
@ -326,7 +326,7 @@ namespace libtorrent
|
|||
#endif
|
||||
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
const char* libtorrent_exception::what() const throw()
|
||||
const char* libtorrent_exception::what() const BOOST_SYSTEM_NOEXCEPT
|
||||
{
|
||||
if (!m_msg)
|
||||
{
|
||||
|
@ -337,7 +337,7 @@ namespace libtorrent
|
|||
return m_msg;
|
||||
}
|
||||
|
||||
libtorrent_exception::~libtorrent_exception() throw()
|
||||
libtorrent_exception::~libtorrent_exception() BOOST_SYSTEM_NOEXCEPT
|
||||
{
|
||||
free(m_msg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue