fixed some unused argument warnings
This commit is contained in:
parent
c90285df8a
commit
a6f345181f
|
@ -229,8 +229,8 @@ namespace libtorrent
|
|||
virtual void on_alert(alert const*) {}
|
||||
|
||||
// return true if the add_torrent_params should be added
|
||||
virtual bool on_unknown_torrent(sha1_hash const& info_hash
|
||||
, peer_connection* pc, add_torrent_params& p)
|
||||
virtual bool on_unknown_torrent(sha1_hash const& /* info_hash */
|
||||
, peer_connection* /* pc */, add_torrent_params& /* p */)
|
||||
{ return false; }
|
||||
|
||||
// called once per second
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace libtorrent
|
|||
void on_response(error_code const& ec, http_parser const& parser
|
||||
, char const* data, int size);
|
||||
|
||||
virtual void on_timeout(error_code const& ec) {}
|
||||
virtual void on_timeout(error_code const&) {}
|
||||
|
||||
void parse(int status_code, lazy_entry const& e);
|
||||
bool extract_peer_info(lazy_entry const& e, peer_entry& ret);
|
||||
|
|
|
@ -95,7 +95,7 @@ public:
|
|||
std::string const& destination() { return m_dest; }
|
||||
|
||||
template <class Handler>
|
||||
void async_connect(endpoint_type const& endpoint, Handler const& handler)
|
||||
void async_connect(endpoint_type const&, Handler const& handler)
|
||||
{
|
||||
// since we don't support regular endpoints, just ignore the one
|
||||
// provided and use m_dest.
|
||||
|
|
|
@ -98,7 +98,7 @@ protected:
|
|||
virtual observer_ptr new_observer(void* ptr
|
||||
, udp::endpoint const& ep, node_id const& id);
|
||||
|
||||
virtual bool invoke(observer_ptr o) { return false; }
|
||||
virtual bool invoke(observer_ptr) { return false; }
|
||||
|
||||
friend void intrusive_ptr_add_ref(traversal_algorithm* p)
|
||||
{
|
||||
|
|
|
@ -55,8 +55,7 @@ typedef boost::function<void(tcp::endpoint, sha1_hash)> peer_callback_t;
|
|||
class lsd : public intrusive_ptr_base<lsd>
|
||||
{
|
||||
public:
|
||||
lsd(io_service& ios, address const& listen_interface
|
||||
, peer_callback_t const& cb);
|
||||
lsd(io_service& ios, peer_callback_t const& cb);
|
||||
~lsd();
|
||||
|
||||
// void rebind(address const& listen_interface);
|
||||
|
|
|
@ -153,7 +153,6 @@ namespace libtorrent
|
|||
boost::weak_ptr<torrent> t
|
||||
, aux::session_interface& ses
|
||||
, aux::session_settings const& sett
|
||||
, boost::shared_ptr<socket_type> const& sock
|
||||
, bool outgoing)
|
||||
: m_torrent(t)
|
||||
, m_ses(ses)
|
||||
|
|
|
@ -148,13 +148,13 @@ public:
|
|||
}
|
||||
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
void bind(endpoint_type const& endpoint)
|
||||
void bind(endpoint_type const& /* endpoint */)
|
||||
{
|
||||
// m_sock.bind(endpoint);
|
||||
}
|
||||
#endif
|
||||
|
||||
void bind(endpoint_type const& endpoint, error_code& ec)
|
||||
void bind(endpoint_type const& /* endpoint */, error_code& /* ec */)
|
||||
{
|
||||
// the reason why we ignore binds here is because we don't
|
||||
// (necessarily) yet know what address family the proxy
|
||||
|
@ -168,13 +168,13 @@ public:
|
|||
}
|
||||
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
void open(protocol_type const& p)
|
||||
void open(protocol_type const&)
|
||||
{
|
||||
// m_sock.open(p);
|
||||
}
|
||||
#endif
|
||||
|
||||
void open(protocol_type const& p, error_code& ec)
|
||||
void open(protocol_type const&, error_code&)
|
||||
{
|
||||
// we need to ignore this for the same reason as stated
|
||||
// for ignoring bind()
|
||||
|
|
|
@ -511,15 +511,15 @@ namespace libtorrent
|
|||
void release_files(storage_error&) {}
|
||||
void delete_files(storage_error&) {}
|
||||
void initialize(storage_error&) {}
|
||||
int move_storage(std::string const&, int flags, storage_error&) { return 0; }
|
||||
int move_storage(std::string const&, int, storage_error&) { return 0; }
|
||||
|
||||
int readv(file::iovec_t const* bufs, int num_bufs, int piece
|
||||
, int offset, int flags, storage_error& ec);
|
||||
int writev(file::iovec_t const* bufs, int num_bufs, int piece
|
||||
, int offset, int flags, storage_error& ec);
|
||||
|
||||
bool verify_resume_data(lazy_entry const& rd, storage_error& error) { return false; }
|
||||
void write_resume_data(entry& rd, storage_error& ec) const {}
|
||||
bool verify_resume_data(lazy_entry const&, storage_error&) { return false; }
|
||||
void write_resume_data(entry&, storage_error&) const {}
|
||||
|
||||
int m_piece_size;
|
||||
};
|
||||
|
@ -528,7 +528,7 @@ namespace libtorrent
|
|||
// anything written to it
|
||||
struct zero_storage : storage_interface
|
||||
{
|
||||
virtual void initialize(storage_error& ec) {}
|
||||
virtual void initialize(storage_error&) {}
|
||||
|
||||
virtual int readv(file::iovec_t const* bufs, int num_bufs
|
||||
, int piece, int offset, int flags, storage_error& ec);
|
||||
|
@ -543,7 +543,7 @@ namespace libtorrent
|
|||
virtual bool verify_resume_data(lazy_entry const& /* rd */, storage_error&)
|
||||
{ return false; }
|
||||
virtual void write_resume_data(entry&, storage_error&) const {}
|
||||
virtual void release_files(storage_error& ec) {}
|
||||
virtual void release_files(storage_error&) {}
|
||||
virtual void rename_file(int /* index */
|
||||
, std::string const& /* new_filenamem */, storage_error&) {}
|
||||
virtual void delete_files(storage_error&) {}
|
||||
|
|
|
@ -104,7 +104,7 @@ namespace libtorrent
|
|||
protected:
|
||||
|
||||
virtual void process_job(T const& j, bool post) = 0;
|
||||
virtual void retain_job(T& j) {}
|
||||
virtual void retain_job(T&) {}
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -240,10 +240,11 @@ namespace libtorrent
|
|||
address const& bind_interface() const { return m_req.bind_ip; }
|
||||
void sent_bytes(int bytes);
|
||||
void received_bytes(int bytes);
|
||||
virtual bool on_receive(error_code const& ec, udp::endpoint const& ep
|
||||
, char const* buf, int size) { return false; }
|
||||
virtual bool on_receive_hostname(error_code const& ec, char const* hostname
|
||||
, char const* buf, int size) { return false; }
|
||||
virtual bool on_receive(error_code const&, udp::endpoint const&
|
||||
, char const* /* buf */, int /* size */) { return false; }
|
||||
virtual bool on_receive_hostname(error_code const&
|
||||
, char const* /* hostname */
|
||||
, char const* /* buf */, int /* size */) { return false; }
|
||||
|
||||
boost::intrusive_ptr<tracker_connection> self()
|
||||
{ return boost::intrusive_ptr<tracker_connection>(this); }
|
||||
|
|
|
@ -55,8 +55,8 @@ namespace libtorrent
|
|||
// propagated to the next observer)
|
||||
virtual bool incoming_packet(error_code const& ec
|
||||
, udp::endpoint const&, char const* buf, int size) = 0;
|
||||
virtual bool incoming_packet(error_code const& ec
|
||||
, char const* hostname, char const* buf, int size) { return false; }
|
||||
virtual bool incoming_packet(error_code const& /* ec */
|
||||
, char const* /* hostname */, char const* /* buf */, int /* size */) { return false; }
|
||||
|
||||
// called when the socket becomes writeable, after having
|
||||
// failed with EWOULDBLOCK
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace libtorrent
|
|||
// return false if this is not a uTP packet
|
||||
virtual bool incoming_packet(error_code const& ec, udp::endpoint const& ep
|
||||
, char const* p, int size);
|
||||
virtual bool incoming_packet(error_code const& ec, char const* host, char const* p, int size)
|
||||
virtual bool incoming_packet(error_code const&, char const*, char const*, int)
|
||||
{ return false; }
|
||||
virtual void writable();
|
||||
|
||||
|
|
|
@ -190,33 +190,33 @@ public:
|
|||
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
template <class IO_Control_Command>
|
||||
void io_control(IO_Control_Command& ioc) {}
|
||||
void io_control(IO_Control_Command&) {}
|
||||
#endif
|
||||
|
||||
template <class IO_Control_Command>
|
||||
void io_control(IO_Control_Command& ioc, error_code& ec) {}
|
||||
void io_control(IO_Control_Command&, error_code&) {}
|
||||
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
void bind(endpoint_type const& /*endpoint*/) {}
|
||||
#endif
|
||||
|
||||
void bind(endpoint_type const& endpoint, error_code& ec);
|
||||
void bind(endpoint_type const&, error_code&);
|
||||
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
template <class SettableSocketOption>
|
||||
void set_option(SettableSocketOption const& opt) {}
|
||||
void set_option(SettableSocketOption const&) {}
|
||||
#endif
|
||||
|
||||
template <class SettableSocketOption>
|
||||
error_code set_option(SettableSocketOption const& opt, error_code& ec) { return ec; }
|
||||
error_code set_option(SettableSocketOption const&, error_code& ec) { return ec; }
|
||||
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
template <class GettableSocketOption>
|
||||
void get_option(GettableSocketOption& opt) {}
|
||||
void get_option(GettableSocketOption&) {}
|
||||
#endif
|
||||
|
||||
template <class GettableSocketOption>
|
||||
error_code get_option(GettableSocketOption& opt, error_code& ec) { return ec; }
|
||||
error_code get_option(GettableSocketOption&, error_code& ec) { return ec; }
|
||||
|
||||
|
||||
void close();
|
||||
|
@ -342,11 +342,11 @@ public:
|
|||
, boost::function<void(error_code const&)> const& handler);
|
||||
|
||||
template <class Protocol>
|
||||
void open(Protocol const& p, error_code& ec)
|
||||
void open(Protocol const&, error_code&)
|
||||
{ m_open = true; }
|
||||
|
||||
template <class Protocol>
|
||||
void open(Protocol const& p)
|
||||
void open(Protocol const&)
|
||||
{ m_open = true; }
|
||||
|
||||
template <class Mutable_Buffers>
|
||||
|
@ -385,7 +385,7 @@ public:
|
|||
}
|
||||
|
||||
template <class Const_Buffers>
|
||||
std::size_t write_some(Const_Buffers const& buffers, error_code& ec)
|
||||
std::size_t write_some(Const_Buffers const& /* buffers */, error_code& /* ec */)
|
||||
{
|
||||
TORRENT_ASSERT(false && "not implemented!");
|
||||
// TODO: implement blocking write. Low priority since it's not used (yet)
|
||||
|
|
|
@ -114,16 +114,17 @@ namespace libtorrent
|
|||
void write_unchoke() {}
|
||||
void write_interested() {}
|
||||
void write_not_interested() {}
|
||||
virtual void write_request(peer_request const& r) = 0;
|
||||
void write_cancel(peer_request const& r) {}
|
||||
void write_have(int index) {}
|
||||
void write_dont_have(int index) {}
|
||||
void write_piece(peer_request const& r, disk_buffer_holder& buffer) { TORRENT_ASSERT(false); }
|
||||
virtual void write_request(peer_request const&) = 0;
|
||||
void write_cancel(peer_request const&) {}
|
||||
void write_have(int) {}
|
||||
void write_dont_have(int) {}
|
||||
void write_piece(peer_request const&, disk_buffer_holder&)
|
||||
{ TORRENT_ASSERT(false); }
|
||||
void write_keepalive() {}
|
||||
void on_connected();
|
||||
void write_reject_request(peer_request const&) {}
|
||||
void write_allow_fast(int) {}
|
||||
void write_suggest(int piece) {}
|
||||
void write_suggest(int) {}
|
||||
void write_bitfield() {}
|
||||
|
||||
#if TORRENT_USE_INVARIANT_CHECKS
|
||||
|
|
|
@ -134,7 +134,8 @@ namespace libtorrent
|
|||
post_impl(a, lock);
|
||||
}
|
||||
|
||||
void alert_manager::post_impl(std::auto_ptr<alert>& alert_, mutex::scoped_lock& l)
|
||||
void alert_manager::post_impl(std::auto_ptr<alert>& alert_
|
||||
, mutex::scoped_lock& /* l */)
|
||||
{
|
||||
if (m_dispatch)
|
||||
{
|
||||
|
|
|
@ -691,7 +691,8 @@ namespace libtorrent
|
|||
}
|
||||
#endif // #ifndef TORRENT_DISABLE_ENCRYPTION
|
||||
|
||||
void regular_c_free(char* buf, void* userdata, block_cache_reference ref)
|
||||
void regular_c_free(char* buf, void* /* userdata */
|
||||
, block_cache_reference /* ref */)
|
||||
{
|
||||
::free(buf);
|
||||
}
|
||||
|
@ -2446,7 +2447,7 @@ namespace libtorrent
|
|||
#endif
|
||||
}
|
||||
|
||||
void buffer_reclaim_block(char* buffer, void* userdata
|
||||
void buffer_reclaim_block(char* /* buffer */, void* userdata
|
||||
, block_cache_reference ref)
|
||||
{
|
||||
buffer_allocator_interface* buf = (buffer_allocator_interface*)userdata;
|
||||
|
@ -2454,7 +2455,7 @@ namespace libtorrent
|
|||
}
|
||||
|
||||
void buffer_free_disk_buf(char* buffer, void* userdata
|
||||
, block_cache_reference ref)
|
||||
, block_cache_reference /* ref */)
|
||||
{
|
||||
buffer_allocator_interface* buf = (buffer_allocator_interface*)userdata;
|
||||
buf->free_disk_buffer(buffer);
|
||||
|
|
|
@ -65,8 +65,7 @@ namespace libtorrent
|
|||
|
||||
static error_code ec;
|
||||
|
||||
lsd::lsd(io_service& ios, address const& listen_interface
|
||||
, peer_callback_t const& cb)
|
||||
lsd::lsd(io_service& ios, peer_callback_t const& cb)
|
||||
: m_callback(cb)
|
||||
, m_socket(udp::endpoint(address_v4::from_string("239.192.152.143", ec), 6771)
|
||||
, boost::bind(&lsd::on_announce, self(), _1, _2, _3))
|
||||
|
|
|
@ -192,7 +192,7 @@ namespace libtorrent { namespace
|
|||
return true;
|
||||
}
|
||||
|
||||
virtual bool on_extended(int length
|
||||
virtual bool on_extended(int /* length */
|
||||
, int extended_msg, buffer::const_interval body)
|
||||
{
|
||||
if (extended_msg != 19) return false;
|
||||
|
|
|
@ -136,7 +136,7 @@ namespace libtorrent
|
|||
, tcp::endpoint const& endp
|
||||
, torrent_peer* peerinfo
|
||||
, bool outgoing)
|
||||
: peer_connection_hot_members(tor, ses, sett, s, outgoing)
|
||||
: peer_connection_hot_members(tor, ses, sett, outgoing)
|
||||
, m_socket(s)
|
||||
, m_peer_info(peerinfo)
|
||||
, m_num_pieces(0)
|
||||
|
|
|
@ -924,7 +924,7 @@ namespace libtorrent
|
|||
}
|
||||
|
||||
void policy::update_peer(torrent_peer* p, int src, int flags
|
||||
, tcp::endpoint const& remote, char const* destination)
|
||||
, tcp::endpoint const& remote, char const* /* destination*/)
|
||||
{
|
||||
TORRENT_ASSERT(is_single_thread());
|
||||
bool was_conn_cand = is_connect_candidate(*p);
|
||||
|
|
|
@ -7487,7 +7487,6 @@ retry:
|
|||
if (m_lsd) return;
|
||||
|
||||
m_lsd = new lsd(m_io_service
|
||||
, m_listen_interface.address()
|
||||
, boost::bind(&session_impl::on_lsd_peer, this, _1, _2));
|
||||
}
|
||||
|
||||
|
|
|
@ -323,7 +323,7 @@ struct utp_socket_impl
|
|||
, boost::uint32_t& min_rtt, boost::uint16_t seq_nr);
|
||||
void write_sack(boost::uint8_t* buf, int size) const;
|
||||
void incoming(boost::uint8_t const* buf, int size, packet* p, ptime now);
|
||||
void do_ledbat(int acked_bytes, int delay, int in_flight, ptime const now);
|
||||
void do_ledbat(int acked_bytes, int delay, int in_flight);
|
||||
int packet_timeout() const;
|
||||
bool test_socket_state();
|
||||
void maybe_trigger_receive_callback();
|
||||
|
@ -2244,7 +2244,8 @@ void utp_socket_impl::ack_packet(packet* p, ptime const& receive_time
|
|||
free(p);
|
||||
}
|
||||
|
||||
void utp_socket_impl::incoming(boost::uint8_t const* buf, int size, packet* p, ptime now)
|
||||
void utp_socket_impl::incoming(boost::uint8_t const* buf, int size, packet* p
|
||||
, ptime /* now */)
|
||||
{
|
||||
INVARIANT_CHECK;
|
||||
|
||||
|
@ -2967,7 +2968,7 @@ bool utp_socket_impl::incoming_packet(boost::uint8_t const* buf, int size
|
|||
// only use the minimum from the last 3 delay measurements
|
||||
delay = *std::min_element(m_delay_sample_hist, m_delay_sample_hist + num_delay_hist);
|
||||
|
||||
do_ledbat(acked_bytes, delay, prev_bytes_in_flight, receive_time);
|
||||
do_ledbat(acked_bytes, delay, prev_bytes_in_flight);
|
||||
m_send_delay = delay;
|
||||
}
|
||||
|
||||
|
@ -3197,7 +3198,7 @@ bool utp_socket_impl::incoming_packet(boost::uint8_t const* buf, int size
|
|||
return false;
|
||||
}
|
||||
|
||||
void utp_socket_impl::do_ledbat(int acked_bytes, int delay, int in_flight, ptime const now)
|
||||
void utp_socket_impl::do_ledbat(int acked_bytes, int delay, int in_flight)
|
||||
{
|
||||
INVARIANT_CHECK;
|
||||
|
||||
|
|
|
@ -137,7 +137,6 @@ int test_main()
|
|||
|
||||
test_swarm();
|
||||
|
||||
test_sleep(2000);
|
||||
TEST_CHECK(!exists("./tmp1_unchoke/temporary"));
|
||||
TEST_CHECK(!exists("./tmp2_unchoke/temporary"));
|
||||
TEST_CHECK(!exists("./tmp3_unchoke/temporary"));
|
||||
|
|
Loading…
Reference in New Issue