Fix all unused parameter warnings (issue #260)

This commit is contained in:
EinMByte 2015-08-30 12:02:09 +02:00
parent 828ac404eb
commit 48c66a1d08
13 changed files with 60 additions and 60 deletions

View file

@ -225,7 +225,7 @@ namespace client
m_Service.post (std::bind (&ClientDestination::HandleDeliveryStatusMessage, this, msg));
}
void ClientDestination::HandleI2NPMessage (const uint8_t * buf, size_t len, std::shared_ptr<i2p::tunnel::InboundTunnel> from)
void ClientDestination::HandleI2NPMessage (const uint8_t * buf, size_t, std::shared_ptr<i2p::tunnel::InboundTunnel> from)
{
uint8_t typeID = buf[I2NP_HEADER_TYPEID_OFFSET];
switch (typeID)
@ -303,7 +303,7 @@ namespace client
}
}
void ClientDestination::HandleDatabaseSearchReplyMessage (const uint8_t * buf, size_t len)
void ClientDestination::HandleDatabaseSearchReplyMessage (const uint8_t * buf, size_t)
{
i2p::data::IdentHash key (buf);
int num = buf[32]; // num
@ -417,7 +417,7 @@ namespace client
}
}
void ClientDestination::HandleDataMessage (const uint8_t * buf, size_t len)
void ClientDestination::HandleDataMessage (const uint8_t * buf, size_t)
{
uint32_t length = bufbe32toh (buf);
buf += 4;

View file

@ -23,7 +23,7 @@ namespace data
return *this;
}
size_t Identity::FromBuffer (const uint8_t * buf, size_t len)
size_t Identity::FromBuffer (const uint8_t * buf, size_t)
{
memcpy (publicKey, buf, DEFAULT_IDENTITY_SIZE);
return DEFAULT_IDENTITY_SIZE;
@ -227,7 +227,7 @@ namespace data
return GetFullLen ();
}
size_t IdentityEx::ToBuffer (uint8_t * buf, size_t len) const
size_t IdentityEx::ToBuffer (uint8_t * buf, size_t) const
{
memcpy (buf, &m_StandardIdentity, DEFAULT_IDENTITY_SIZE);
if (m_ExtendedLen > 0 && m_ExtendedBuffer)

View file

@ -294,7 +294,7 @@ namespace i2p
return i2p::tunnel::tunnels.GetExploratoryPool ();
}
void RouterContext::HandleI2NPMessage (const uint8_t * buf, size_t len, std::shared_ptr<i2p::tunnel::InboundTunnel> from)
void RouterContext::HandleI2NPMessage (const uint8_t * buf, size_t, std::shared_ptr<i2p::tunnel::InboundTunnel> from)
{
i2p::HandleI2NPMessage (CreateI2NPMessage (buf, GetI2NPMessageLength (buf), from));
}

View file

@ -692,7 +692,7 @@ namespace stream
}
}
void Stream::HandleAckSendTimer (const boost::system::error_code& ecode)
void Stream::HandleAckSendTimer (const boost::system::error_code&)
{
if (m_IsAckSendScheduled)
{

View file

@ -138,7 +138,7 @@ namespace transport
}
}
void NTCPSession::HandlePhase1Sent (const boost::system::error_code& ecode, std::size_t bytes_transferred)
void NTCPSession::HandlePhase1Sent (const boost::system::error_code& ecode, std::size_t)
{
if (ecode)
{
@ -154,7 +154,7 @@ namespace transport
}
}
void NTCPSession::HandlePhase1Received (const boost::system::error_code& ecode, std::size_t bytes_transferred)
void NTCPSession::HandlePhase1Received (const boost::system::error_code& ecode, std::size_t)
{
if (ecode)
{
@ -209,7 +209,7 @@ namespace transport
}
void NTCPSession::HandlePhase2Sent (const boost::system::error_code& ecode, std::size_t bytes_transferred, uint32_t tsB)
void NTCPSession::HandlePhase2Sent (const boost::system::error_code& ecode, std::size_t, uint32_t tsB)
{
if (ecode)
{
@ -225,7 +225,7 @@ namespace transport
}
}
void NTCPSession::HandlePhase2Received (const boost::system::error_code& ecode, std::size_t bytes_transferred)
void NTCPSession::HandlePhase2Received (const boost::system::error_code& ecode, std::size_t)
{
if (ecode)
{
@ -299,7 +299,7 @@ namespace transport
std::bind(&NTCPSession::HandlePhase3Sent, shared_from_this (), std::placeholders::_1, std::placeholders::_2, tsA));
}
void NTCPSession::HandlePhase3Sent (const boost::system::error_code& ecode, std::size_t bytes_transferred, uint32_t tsA)
void NTCPSession::HandlePhase3Sent (const boost::system::error_code& ecode, std::size_t, uint32_t tsA)
{
if (ecode)
{
@ -412,7 +412,7 @@ namespace transport
std::bind(&NTCPSession::HandlePhase4Sent, shared_from_this (), std::placeholders::_1, std::placeholders::_2));
}
void NTCPSession::HandlePhase4Sent (const boost::system::error_code& ecode, std::size_t bytes_transferred)
void NTCPSession::HandlePhase4Sent (const boost::system::error_code& ecode, std::size_t)
{
if (ecode)
{
@ -643,7 +643,7 @@ namespace transport
std::bind(&NTCPSession::HandleSent, shared_from_this (), std::placeholders::_1, std::placeholders::_2, msgs));
}
void NTCPSession::HandleSent (const boost::system::error_code& ecode, std::size_t bytes_transferred, std::vector<std::shared_ptr<I2NPMessage> > msgs)
void NTCPSession::HandleSent (const boost::system::error_code& ecode, std::size_t bytes_transferred, std::vector<std::shared_ptr<I2NPMessage> >)
{
m_IsSending = false;
if (ecode)
@ -710,7 +710,7 @@ namespace transport
}
//-----------------------------------------
NTCPServer::NTCPServer (int port):
NTCPServer::NTCPServer (int):
m_IsRunning (false), m_Thread (nullptr), m_Work (m_Service),
m_NTCPAcceptor (nullptr), m_NTCPV6Acceptor (nullptr)
{

View file

@ -172,7 +172,7 @@ namespace transport
}
}
void SSUSession::ProcessSessionRequest (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& senderEndpoint)
void SSUSession::ProcessSessionRequest (uint8_t * buf, size_t, const boost::asio::ip::udp::endpoint& senderEndpoint)
{
LogPrint (eLogDebug, "Session request received");
m_RemoteEndpoint = senderEndpoint;
@ -182,7 +182,7 @@ namespace transport
SendSessionCreated (buf + sizeof (SSUHeader));
}
void SSUSession::ProcessSessionCreated (uint8_t * buf, size_t len)
void SSUSession::ProcessSessionCreated (uint8_t * buf, size_t)
{
if (!m_RemoteRouter || !m_DHKeysPair)
{
@ -246,7 +246,7 @@ namespace transport
SendSessionConfirmed (y, ourAddress, addressSize + 2);
}
void SSUSession::ProcessSessionConfirmed (uint8_t * buf, size_t len)
void SSUSession::ProcessSessionConfirmed (uint8_t * buf, size_t)
{
LogPrint (eLogDebug, "Session confirmed received");
uint8_t * payload = buf + sizeof (SSUHeader);
@ -450,7 +450,7 @@ namespace transport
Send (buf, msgLen);
}
void SSUSession::ProcessRelayRequest (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& from)
void SSUSession::ProcessRelayRequest (uint8_t * buf, size_t, const boost::asio::ip::udp::endpoint& from)
{
uint32_t relayTag = bufbe32toh (buf);
auto session = m_Server.FindRelaySession (relayTag);
@ -553,7 +553,7 @@ namespace transport
LogPrint (eLogDebug, "SSU relay intro sent");
}
void SSUSession::ProcessRelayResponse (uint8_t * buf, size_t len)
void SSUSession::ProcessRelayResponse (uint8_t * buf, size_t)
{
LogPrint (eLogDebug, "Relay response received");
uint8_t * payload = buf + sizeof (SSUHeader);
@ -585,7 +585,7 @@ namespace transport
i2p::context.UpdateAddress (ourIP);
}
void SSUSession::ProcessRelayIntro (uint8_t * buf, size_t len)
void SSUSession::ProcessRelayIntro (uint8_t * buf, size_t)
{
uint8_t size = *buf;
if (size == 4)

View file

@ -350,7 +350,7 @@ namespace transport
}
void Transports::HandleNTCPResolve (const boost::system::error_code& ecode, boost::asio::ip::tcp::resolver::iterator it,
i2p::data::IdentHash ident, std::shared_ptr<boost::asio::ip::tcp::resolver> resolver)
i2p::data::IdentHash ident, std::shared_ptr<boost::asio::ip::tcp::resolver>)
{
auto it1 = m_Peers.find (ident);
if (it1 != m_Peers.end ())

View file

@ -52,12 +52,12 @@ namespace tunnel
}
}
void TransitTunnel::SendTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage> msg)
void TransitTunnel::SendTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage>)
{
LogPrint (eLogError, "We are not a gateway for transit tunnel ", m_TunnelID);
}
void TransitTunnel::HandleTunnelDataMsg (std::shared_ptr<const i2p::I2NPMessage> tunnelMsg)
void TransitTunnel::HandleTunnelDataMsg (std::shared_ptr<const i2p::I2NPMessage>)
{
LogPrint (eLogError, "Incoming tunnel message is not supported ", m_TunnelID);
}

View file

@ -86,7 +86,7 @@ namespace tunnel
i2p::transport::transports.SendMessage (GetNextIdentHash (), ToSharedI2NPMessage (msg));
}
bool Tunnel::HandleTunnelBuildResponse (uint8_t * msg, size_t len)
bool Tunnel::HandleTunnelBuildResponse (uint8_t * msg, size_t)
{
LogPrint ("TunnelBuildResponse ", (int)msg[0], " records.");
@ -153,7 +153,7 @@ namespace tunnel
}
}
void Tunnel::SendTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage> msg)
void Tunnel::SendTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage>)
{
LogPrint (eLogInfo, "Can't send I2NP messages without delivery instructions");
}
@ -197,7 +197,7 @@ namespace tunnel
m_Gateway.SendBuffer ();
}
void OutboundTunnel::HandleTunnelDataMsg (std::shared_ptr<const i2p::I2NPMessage> tunnelMsg)
void OutboundTunnel::HandleTunnelDataMsg (std::shared_ptr<const i2p::I2NPMessage>)
{
LogPrint (eLogError, "Incoming message for outbound tunnel ", GetTunnelID ());
}