diff --git a/include/libtorrent/alert_types.hpp b/include/libtorrent/alert_types.hpp index d17c9c3a6..12230c377 100644 --- a/include/libtorrent/alert_types.hpp +++ b/include/libtorrent/alert_types.hpp @@ -1839,6 +1839,15 @@ namespace libtorrent }; #ifndef TORRENT_NO_DEPRECATE +#ifdef _MSC_VER +#pragma warning(push, 1) +// warning C4996: X: was declared deprecated +#pragma warning( disable : 4996 ) +#endif +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif struct TORRENT_DEPRECATED TORRENT_EXPORT mmap_cache_alert final : alert { mmap_cache_alert(aux::stack_allocator& alloc @@ -1850,6 +1859,12 @@ namespace libtorrent error_code const error; }; +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif +#ifdef _MSC_VER +#pragma warning(pop) +#endif #endif // The session_stats_alert is posted when the user requests session statistics by @@ -1885,6 +1900,15 @@ namespace libtorrent // // Once this download completes, the ``torrent_update_alert`` is posted to // notify the client of the info-hash changing. +#ifdef _MSC_VER +#pragma warning(push, 1) +// warning C4996: X: was declared deprecated +#pragma warning( disable : 4996 ) +#endif +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif struct TORRENT_DEPRECATED TORRENT_EXPORT torrent_update_alert final : torrent_alert { // internal @@ -1900,6 +1924,12 @@ namespace libtorrent sha1_hash old_ih; sha1_hash new_ih; }; +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif +#ifdef _MSC_VER +#pragma warning(pop) +#endif #endif // posted when something fails in the DHT. This is not necessarily a fatal diff --git a/include/libtorrent/settings_pack.hpp b/include/libtorrent/settings_pack.hpp index 7151f9a4e..7840f4ef2 100644 --- a/include/libtorrent/settings_pack.hpp +++ b/include/libtorrent/settings_pack.hpp @@ -143,7 +143,7 @@ namespace libtorrent // don't have ``mmap`` this setting is ignored. mmap_cache, #else - deprecated12, + deprecated21, #endif // this is the client name and version identifier sent to peers in the