Fixed cppcheck errors

This commit is contained in:
SChernykh 2023-05-10 10:35:23 +02:00
parent fa924171c7
commit 689fa14cfd
3 changed files with 9 additions and 2 deletions

View file

@ -196,6 +196,7 @@ static void do_loglevel(p2pool * /* m_pool */, const char *args)
LOGINFO(0, "log level set to " << level);
}
// cppcheck-suppress constParameterCallback
static void do_addpeers(p2pool *m_pool, const char *args)
{
if (m_pool->p2p_server()) {
@ -203,6 +204,7 @@ static void do_addpeers(p2pool *m_pool, const char *args)
}
}
// cppcheck-suppress constParameterCallback
static void do_droppeers(p2pool *m_pool, const char * /* args */)
{
if (m_pool->p2p_server()) {
@ -210,6 +212,7 @@ static void do_droppeers(p2pool *m_pool, const char * /* args */)
}
}
// cppcheck-suppress constParameterCallback
static void do_showpeers(p2pool* m_pool, const char* /* args */)
{
if (m_pool->p2p_server()) {
@ -217,6 +220,7 @@ static void do_showpeers(p2pool* m_pool, const char* /* args */)
}
}
// cppcheck-suppress constParameterCallback
static void do_showworkers(p2pool* m_pool, const char* /* args */)
{
if (m_pool->stratum_server()) {
@ -224,6 +228,7 @@ static void do_showworkers(p2pool* m_pool, const char* /* args */)
}
}
// cppcheck-suppress constParameterCallback
static void do_showbans(p2pool* m_pool, const char* /* args */)
{
if (m_pool->stratum_server()) {
@ -234,6 +239,7 @@ static void do_showbans(p2pool* m_pool, const char* /* args */)
}
}
// cppcheck-suppress constParameterCallback
static void do_outpeers(p2pool* m_pool, const char* args)
{
if (m_pool->p2p_server()) {
@ -242,6 +248,7 @@ static void do_outpeers(p2pool* m_pool, const char* args)
}
}
// cppcheck-suppress constParameterCallback
static void do_inpeers(p2pool* m_pool, const char* args)
{
if (m_pool->p2p_server()) {

View file

@ -699,7 +699,7 @@ void P2PServer::update_peer_in_list(bool is_v6, const raw_ip& ip, int port)
}
}
void P2PServer::remove_peer_from_list(P2PClient* client)
void P2PServer::remove_peer_from_list(const P2PClient* client)
{
MutexLock lock(m_peerListLock);

View file

@ -201,7 +201,7 @@ private:
void load_peer_list();
void load_monerod_peer_list();
void update_peer_in_list(bool is_v6, const raw_ip& ip, int port);
void remove_peer_from_list(P2PClient* client);
void remove_peer_from_list(const P2PClient* client);
void remove_peer_from_list(const raw_ip& ip);
std::mt19937_64 m_rng;