diff --git a/clang_tidy.jam b/clang_tidy.jam index 726018aaf..199fb4971 100644 --- a/clang_tidy.jam +++ b/clang_tidy.jam @@ -67,12 +67,12 @@ toolset.flags clang_tidy.compile OPTIONS off : -fno-rtti ; TOUCH = [ common.file-creation-command ] ; actions compile.c++ { - "$(CONFIG_COMMAND)" -header-filter=*. -warnings-as-errors=* "$(>)" -- -x c++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" \ + "$(CONFIG_COMMAND)" -quiet -header-filter=* -warnings-as-errors=* "$(>)" -- -x c++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" \ && $(TOUCH) "$(<)" } actions compile.c { - "$(CONFIG_COMMAND)" -header-filter=*. -warnings-as-errors=* "$(>)" -- -x c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" \ + "$(CONFIG_COMMAND)" -quiet -header-filter=* -warnings-as-errors=* "$(>)" -- -x c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" \ && $(TOUCH) "$(<)" } diff --git a/src/alert.cpp b/src/alert.cpp index efe3d4e4c..f20dde260 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -587,7 +587,7 @@ namespace libtorrent { { char ret[200]; std::snprintf(ret, sizeof(ret), "%s peer dropped block ( piece: %d block: %d)" - , torrent_alert::message().c_str(), static_cast(piece_index), block_index); + , peer_alert::message().c_str(), static_cast(piece_index), block_index); return ret; } @@ -605,7 +605,7 @@ namespace libtorrent { { char ret[200]; std::snprintf(ret, sizeof(ret), "%s peer timed out request ( piece: %d block: %d)" - , torrent_alert::message().c_str(), static_cast(piece_index), block_index); + , peer_alert::message().c_str(), static_cast(piece_index), block_index); return ret; } @@ -623,7 +623,7 @@ namespace libtorrent { { char ret[200]; std::snprintf(ret, sizeof(ret), "%s block finished downloading (piece: %d block: %d)" - , torrent_alert::message().c_str(), static_cast(piece_index), block_index); + , peer_alert::message().c_str(), static_cast(piece_index), block_index); return ret; } @@ -644,7 +644,7 @@ namespace libtorrent { { char ret[200]; std::snprintf(ret, sizeof(ret), "%s requested block (piece: %d block: %d)" - , torrent_alert::message().c_str(), static_cast(piece_index), block_index); + , peer_alert::message().c_str(), static_cast(piece_index), block_index); return ret; } @@ -662,7 +662,7 @@ namespace libtorrent { { char ret[200]; std::snprintf(ret, sizeof(ret), "%s received block not in download queue (piece: %d block: %d)" - , torrent_alert::message().c_str(), static_cast(piece_index), block_index); + , peer_alert::message().c_str(), static_cast(piece_index), block_index); return ret; } @@ -1868,7 +1868,7 @@ namespace { { static char const* const mode[] = { "<==", "==>", "<<<", ">>>", "***" }; - return torrent_alert::message() + " [" + print_endpoint(endpoint) + "] " + return peer_alert::message() + " [" + print_endpoint(endpoint) + "] " + mode[direction] + " " + event_type + " [ " + log_message() + " ]"; } @@ -2285,8 +2285,8 @@ namespace { "reverse_sequential ", "backup1 ", "backup2 ", - "end_game " - "extent_affinity " + "end_game ", + "extent_affinity ", }; std::string ret = peer_alert::message(); @@ -2530,7 +2530,7 @@ namespace { { char ret[200]; snprintf(ret, sizeof(ret), "%s block uploaded to a peer (piece: %d block: %d)" - , torrent_alert::message().c_str(), static_cast(piece_index), block_index); + , peer_alert::message().c_str(), static_cast(piece_index), block_index); return ret; } diff --git a/src/bitfield.cpp b/src/bitfield.cpp index d4700c5b3..c73b5c696 100644 --- a/src/bitfield.cpp +++ b/src/bitfield.cpp @@ -144,14 +144,14 @@ namespace libtorrent { if (old_size_words && b) buf()[old_size_words - 1] |= aux::host_to_network(0xffffffff >> b); if (old_size_words < new_size_words) std::memset(buf() + old_size_words, 0xff - , std::size_t((new_size_words - old_size_words) * 4)); + , static_cast(new_size_words - old_size_words) * 4); clear_trailing_bits(); } else { if (old_size_words < new_size_words) std::memset(buf() + old_size_words, 0x00 - , std::size_t((new_size_words - old_size_words) * 4)); + , static_cast(new_size_words - old_size_words) * 4); } TORRENT_ASSERT(size() == bits); } diff --git a/src/magnet_uri.cpp b/src/magnet_uri.cpp index d9888c42e..084a07f49 100644 --- a/src/magnet_uri.cpp +++ b/src/magnet_uri.cpp @@ -298,7 +298,7 @@ namespace libtorrent { } if (int(p.file_priorities.size()) <= idx2) - p.file_priorities.resize(std::size_t(idx2 + 1), dont_download); + p.file_priorities.resize(static_cast(idx2) + 1, dont_download); for (int i = idx1; i <= idx2; i++) p.file_priorities[std::size_t(i)] = default_priority;