mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
libretroshare: remove unused variables
This commit is contained in:
parent
617a863f12
commit
cfc0e7071a
@ -1159,8 +1159,7 @@ bool CacheTransfer::RequestCache(RsCacheData &data, CacheStore *cbStore)
|
||||
*/
|
||||
if ((data.hash == dit->second.hash) &&
|
||||
(data.path == dit->second.path) &&
|
||||
(data.size == dit->second.size) &&
|
||||
(cbStore == cbStore))
|
||||
(data.size == dit->second.size))
|
||||
{
|
||||
std::cerr << "Re-request duplicate cache... let it continue";
|
||||
std::cerr << std::endl;
|
||||
|
@ -256,7 +256,7 @@ bool ftServer::ResumeTransfers()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ftServer::checkHash(const RsFileHash& hash,std::string& error_string)
|
||||
bool ftServer::checkHash(const RsFileHash& /*hash*/, std::string& /*error_string*/)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
@ -532,7 +532,7 @@ bool RsGRouterTransactionAcknItem::serialise(void *data,uint32_t& size) const
|
||||
|
||||
return ok;
|
||||
}
|
||||
bool RsGRouterGenericDataItem::serialise_signed_data(void *data,uint32_t& size) const
|
||||
bool RsGRouterGenericDataItem::serialise_signed_data(void *data, uint32_t &/*size*/) const
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
@ -580,7 +580,7 @@ bool RsGRouterSignedReceiptItem::serialise(void *data,uint32_t& size) const
|
||||
|
||||
return ok;
|
||||
}
|
||||
bool RsGRouterSignedReceiptItem::serialise_signed_data(void *data,uint32_t& size) const
|
||||
bool RsGRouterSignedReceiptItem::serialise_signed_data(void *data, uint32_t &/*size*/) const
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
|
@ -483,7 +483,7 @@ void p3GRouter::handleLowLevelTransactionAckItem(RsGRouterTransactionAcknItem *t
|
||||
#endif
|
||||
}
|
||||
|
||||
void p3GRouter::receiveTurtleData(RsTurtleGenericTunnelItem *gitem,const RsFileHash& hash,const RsPeerId& virtual_peer_id,RsTurtleGenericTunnelItem::Direction direction)
|
||||
void p3GRouter::receiveTurtleData(RsTurtleGenericTunnelItem *gitem, const RsFileHash &/*hash*/, const RsPeerId &virtual_peer_id, RsTurtleGenericTunnelItem::Direction /*direction*/)
|
||||
{
|
||||
#ifdef GROUTER_DEBUG
|
||||
std::cerr << "p3GRouter::receiveTurtleData() " << std::endl;
|
||||
|
@ -301,7 +301,7 @@ void p3GxsTunnelService::handleIncomingItem(const RsGxsTunnelId& tunnel_id,RsGxs
|
||||
delete item ;
|
||||
}
|
||||
|
||||
void p3GxsTunnelService::handleRecvTunnelDataAckItem(const RsGxsTunnelId& id,RsGxsTunnelDataAckItem *item)
|
||||
void p3GxsTunnelService::handleRecvTunnelDataAckItem(const RsGxsTunnelId &/*id*/,RsGxsTunnelDataAckItem *item)
|
||||
{
|
||||
RS_STACK_MUTEX(mGxsTunnelMtx); /********** STACK LOCKED MTX ******/
|
||||
|
||||
|
@ -373,7 +373,7 @@ RsGxsTunnelDHPublicKeyItem *RsGxsTunnelSerialiser::deserialise_RsGxsTunnelDHPubl
|
||||
return item ;
|
||||
}
|
||||
|
||||
RsGxsTunnelDataItem *RsGxsTunnelSerialiser::deserialise_RsGxsTunnelDataItem(void *dat,uint32_t size)
|
||||
RsGxsTunnelDataItem *RsGxsTunnelSerialiser::deserialise_RsGxsTunnelDataItem(void *dat,uint32_t /*size*/)
|
||||
{
|
||||
uint32_t offset = 8; // skip the header
|
||||
uint32_t rssize = getRsItemSize(dat);
|
||||
@ -450,7 +450,7 @@ RsGxsTunnelDataAckItem *RsGxsTunnelSerialiser::deserialise_RsGxsTunnelDataAckIte
|
||||
return item ;
|
||||
}
|
||||
|
||||
RsGxsTunnelStatusItem *RsGxsTunnelSerialiser::deserialise_RsGxsTunnelStatusItem(void *dat,uint32_t size)
|
||||
RsGxsTunnelStatusItem *RsGxsTunnelSerialiser::deserialise_RsGxsTunnelStatusItem(void *dat, uint32_t /*size*/)
|
||||
{
|
||||
uint32_t offset = 8; // skip the header
|
||||
uint32_t rssize = getRsItemSize(dat);
|
||||
|
@ -554,7 +554,7 @@ bool RsPluginManager::saveList(bool& cleanup, std::list<RsItem*>& list)
|
||||
// {
|
||||
// }
|
||||
|
||||
RsPQIService::RsPQIService(uint16_t service_type,uint32_t /*tick_delay_in_seconds*/, RsPluginHandler* /*pgHandler*/)
|
||||
RsPQIService::RsPQIService(uint16_t /*service_type*/, uint32_t /*tick_delay_in_seconds*/, RsPluginHandler* /*pgHandler*/)
|
||||
: p3Service(),p3Config()
|
||||
{
|
||||
}
|
||||
|
@ -105,7 +105,6 @@ void p3HistoryMgr::addMessage(const ChatMessage& cm)
|
||||
|
||||
if(cm.chat_id.isDistantChatId())
|
||||
{
|
||||
uint32_t status;
|
||||
DistantChatPeerInfo dcpinfo;
|
||||
if (rsMsgs->getDistantChatStatus(cm.chat_id.toDistantChatId(), dcpinfo))
|
||||
peerName = cm.chat_id.toPeerId().toStdString();
|
||||
|
@ -1036,7 +1036,7 @@ bool p3LinkMgrIMPL::connectResult(const RsPeerId &id, bool success, bool isIncom
|
||||
*/
|
||||
|
||||
// from pqissl, when a connection failed due to security
|
||||
void p3LinkMgrIMPL::notifyDeniedConnection(const RsPgpId& gpgid,const RsPeerId& sslid,const std::string& sslcn,const struct sockaddr_storage &addr, bool incoming)
|
||||
void p3LinkMgrIMPL::notifyDeniedConnection(const RsPgpId& gpgid,const RsPeerId& sslid,const std::string& sslcn,const struct sockaddr_storage &/*addr*/, bool incoming)
|
||||
{
|
||||
std::cerr << "p3LinkMgrIMPL::notifyDeniedConnection()";
|
||||
std::cerr << " pgpid: " << gpgid;
|
||||
|
@ -125,7 +125,7 @@ public:
|
||||
return ok;
|
||||
}
|
||||
|
||||
static RsServicePermissionItem *deserialise(uint8_t *data,uint32_t size)
|
||||
static RsServicePermissionItem *deserialise(uint8_t *data, uint32_t /*size*/)
|
||||
{
|
||||
RsServicePermissionItem *item = new RsServicePermissionItem ;
|
||||
|
||||
@ -1247,6 +1247,8 @@ void p3ServiceControl::updatePeerConnect(const RsPeerId &peerId)
|
||||
#ifdef SERVICECONTROL_DEBUG
|
||||
std::cerr << "p3ServiceControl::updatePeerConnect(): " << peerId.toStdString();
|
||||
std::cerr << std::endl;
|
||||
#else
|
||||
(void)peerId;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ void pqiConnectCbDummy::peerConnectRequest(const RsPeerId& id,
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
|
||||
void pqiMonitor::disconnectPeer(const RsPeerId &peer)
|
||||
void pqiMonitor::disconnectPeer(const RsPeerId &/*peer*/)
|
||||
{
|
||||
std::cerr << "(EE) pqiMonitor::disconnectPeer() shouldn't be called!!!"<< std::endl;
|
||||
}
|
||||
|
@ -1303,7 +1303,7 @@ int pqissl::Authorise_SSL_Connection()
|
||||
// which could be
|
||||
// (pqissl's case) sslcert->serveraddr or sslcert->localaddr.
|
||||
|
||||
bool res = AuthSSL::getAuthSSL()->CheckCertificate(PeerId(), peercert);
|
||||
AuthSSL::getAuthSSL()->CheckCertificate(PeerId(), peercert);
|
||||
bool certCorrect = true; /* WE know it okay already! */
|
||||
|
||||
uint32_t check_result ;
|
||||
|
@ -126,7 +126,6 @@ void RsGxsCircleSubscriptionRequestItem::clear()
|
||||
std::ostream& RsGxsCircleSubscriptionRequestItem::print(std::ostream& out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsGxsCircleSubscriptionRequestItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
printRsItemBase(out, "time stmp: ", indent); out << time_stamp ;
|
||||
printRsItemBase(out, "time out : ", indent); out << time_out ;
|
||||
|
@ -288,10 +288,8 @@ std::ostream& RsGxsVoteItem::print(std::ostream& out, uint16_t indent)
|
||||
}
|
||||
|
||||
|
||||
uint32_t RsGxsCommentSerialiser::sizeGxsVoteItem(RsGxsVoteItem *item)
|
||||
uint32_t RsGxsCommentSerialiser::sizeGxsVoteItem(RsGxsVoteItem */*item*/)
|
||||
{
|
||||
|
||||
const RsGxsVote& msg = item->mMsg;
|
||||
uint32_t s = 8; // header
|
||||
|
||||
s += 4; // vote flags.
|
||||
|
@ -81,7 +81,6 @@ void RsGxsReputationUpdateItem::clear()
|
||||
std::ostream& RsGxsReputationConfigItem::print(std::ostream &out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsReputationConfigItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
out << "mPeerId: " << mPeerId << std::endl;
|
||||
out << "last update: " << time(NULL) - mLatestUpdate << " secs ago." << std::endl;
|
||||
@ -94,7 +93,6 @@ std::ostream& RsGxsReputationConfigItem::print(std::ostream &out, uint16_t inden
|
||||
std::ostream& RsGxsReputationSetItem::print(std::ostream &out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsReputationSetItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
out << "GxsId: " << mGxsId << std::endl;
|
||||
out << "mOwnOpinion: " << mOwnOpinion << std::endl;
|
||||
@ -110,7 +108,6 @@ std::ostream& RsGxsReputationSetItem::print(std::ostream &out, uint16_t indent)
|
||||
std::ostream& RsGxsReputationUpdateItem::print(std::ostream &out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsReputationUpdateItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
out << "from: " << PeerId() << std::endl;
|
||||
out << "last update: " << time(NULL) - mLatestUpdate << " secs ago." << std::endl;
|
||||
@ -124,7 +121,6 @@ std::ostream& RsGxsReputationUpdateItem::print(std::ostream &out, uint16_t inden
|
||||
std::ostream& RsGxsReputationRequestItem::print(std::ostream &out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsReputationRequestItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
out << "last update: " << time(NULL) - mLastUpdate << " secs ago." << std::endl;
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
/***** RsServiceInfo ****/
|
||||
|
||||
template<>
|
||||
std::ostream &RsTlvParamRef<RsServiceInfo>::print(std::ostream &out, uint16_t indent) const
|
||||
std::ostream &RsTlvParamRef<RsServiceInfo>::print(std::ostream &out, uint16_t /*indent*/) const
|
||||
{
|
||||
out << "RsServiceInfo: " << mParam.mServiceType << " name " << mParam.mServiceName;
|
||||
out << std::endl;
|
||||
|
@ -56,7 +56,6 @@ void RsTlvParamRef<uint16_t>::TlvClear()
|
||||
template<>
|
||||
bool RsTlvParamRef<uint16_t>::SetTlv(void *data, uint32_t size, uint32_t *offset) const
|
||||
{
|
||||
uint16_t param = mParam;
|
||||
return SetTlvUInt16(data, size, offset, mParamType, mParam);
|
||||
}
|
||||
|
||||
@ -100,7 +99,7 @@ bool RsTlvParamRef<const uint16_t>::SetTlv(void *data, uint32_t size, uint32_t *
|
||||
}
|
||||
|
||||
template<>
|
||||
bool RsTlvParamRef<const uint16_t>::GetTlv(void *data, uint32_t size, uint32_t *offset)
|
||||
bool RsTlvParamRef<const uint16_t>::GetTlv(void */*data*/, uint32_t /*size*/, uint32_t */*offset*/)
|
||||
{
|
||||
return false; //GetTlvUInt16(data, size, offset, mParamType, &mParam);
|
||||
}
|
||||
@ -169,7 +168,7 @@ bool RsTlvParamRef<const uint32_t>::SetTlv(void *data, uint32_t size, uint32_t *
|
||||
}
|
||||
|
||||
template<>
|
||||
bool RsTlvParamRef<const uint32_t>::GetTlv(void *data, uint32_t size, uint32_t *offset)
|
||||
bool RsTlvParamRef<const uint32_t>::GetTlv(void */*data*/, uint32_t /*size*/, uint32_t */*offset*/)
|
||||
{
|
||||
return false;
|
||||
//GetTlvUInt32(data, size, offset, mParamType, &mParam);
|
||||
|
@ -675,7 +675,7 @@ bool p3BanList::recvBanItem(RsBanListItem *item)
|
||||
}
|
||||
|
||||
/* overloaded from pqiNetAssistSharePeer */
|
||||
void p3BanList::updatePeer(const RsPeerId& /*id*/, const struct sockaddr_storage &addr, int type, int /*reason*/, int time_stamp)
|
||||
void p3BanList::updatePeer(const RsPeerId& /*id*/, const struct sockaddr_storage &addr, int /*type*/, int /*reason*/, int time_stamp)
|
||||
{
|
||||
RsPeerId ownId = mServiceCtrl->getOwnId();
|
||||
|
||||
|
@ -1044,6 +1044,8 @@ bool p3GxsCircles::cache_load_for_token(uint32_t token)
|
||||
bool p3GxsCircles::locked_processLoadingCacheEntry(RsGxsCircleCache& cache)
|
||||
{
|
||||
bool isUnprocessedPeers = false;
|
||||
// remove unused-but-set warning
|
||||
(void)isUnprocessedPeers;
|
||||
|
||||
if (cache.mIsExternal)
|
||||
{
|
||||
|
@ -563,7 +563,7 @@ bool p3GxsForums::generateGroup(uint32_t &token, std::string groupName)
|
||||
|
||||
|
||||
// Overloaded from RsTickEvent for Event callbacks.
|
||||
void p3GxsForums::handle_event(uint32_t event_type, const std::string &elabel)
|
||||
void p3GxsForums::handle_event(uint32_t event_type, const std::string &/*elabel*/)
|
||||
{
|
||||
std::cerr << "p3GxsForums::handle_event(" << event_type << ")";
|
||||
std::cerr << std::endl;
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
Reputation()
|
||||
:mOwnOpinion(RsReputations::OPINION_NEUTRAL), mOwnOpinionTs(0),mFriendAverage(1.0f), mReputation(RsReputations::OPINION_NEUTRAL),mIdentityFlags(REPUTATION_IDENTITY_FLAG_NEEDS_UPDATE){ }
|
||||
|
||||
Reputation(const RsGxsId& about)
|
||||
Reputation(const RsGxsId& /*about*/)
|
||||
:mOwnOpinion(RsReputations::OPINION_NEUTRAL), mOwnOpinionTs(0),mFriendAverage(1.0f), mReputation(RsReputations::OPINION_NEUTRAL),mIdentityFlags(REPUTATION_IDENTITY_FLAG_NEEDS_UPDATE){ }
|
||||
|
||||
void updateReputation();
|
||||
|
@ -3871,7 +3871,7 @@ void p3IdService::handleResponse(uint32_t token, uint32_t req_type)
|
||||
|
||||
|
||||
// Overloaded from RsTickEvent for Event callbacks.
|
||||
void p3IdService::handle_event(uint32_t event_type, const std::string &elabel)
|
||||
void p3IdService::handle_event(uint32_t event_type, const std::string &/*elabel*/)
|
||||
{
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::handle_event(" << event_type << ")";
|
||||
|
@ -1945,7 +1945,7 @@ uint32_t p3MsgService::getDistantMessagingPermissionFlags()
|
||||
return mDistantMessagePermissions ;
|
||||
}
|
||||
|
||||
void p3MsgService::receiveGRouterData(const RsGxsId& destination_key, const RsGxsId& signing_key,GRouterServiceId& client_id,uint8_t *data,uint32_t data_size)
|
||||
void p3MsgService::receiveGRouterData(const RsGxsId &destination_key, const RsGxsId &signing_key, GRouterServiceId &/*client_id*/, uint8_t *data, uint32_t data_size)
|
||||
{
|
||||
std::cerr << "p3MsgService::receiveGRouterData(): received message item of size " << data_size << ", for key " << destination_key << std::endl;
|
||||
|
||||
|
@ -261,12 +261,12 @@ int p3rtt::handlePing(RsItem *item)
|
||||
// add our timestamp.
|
||||
pong->mPongTS = convertTsTo64bits(ts);
|
||||
|
||||
static double mLastResponseToPong = 0.0 ;// bad stuff
|
||||
#ifdef DEBUG_RTT
|
||||
static double mLastResponseToPong = 0.0 ;// bad stuff
|
||||
std::cerr << "Delay since last response to PONG: " << ts - mLastResponseToPong << std::endl;
|
||||
mLastResponseToPong = ts ;
|
||||
#endif
|
||||
|
||||
mLastResponseToPong = ts ;
|
||||
sendItem(pong);
|
||||
return true ;
|
||||
}
|
||||
|
@ -120,6 +120,8 @@ void RetroDb::closeDb(){
|
||||
|
||||
#ifdef RETRODB_DEBUG
|
||||
std::cerr << "RetroDb::closeDb(): Error code on close: " << rc << std::endl;
|
||||
#else
|
||||
(void)rc;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -294,7 +294,7 @@ bool RsDirUtil::copyFile(const std::string& source,const std::string& dest)
|
||||
fclose(in) ;
|
||||
fclose(out) ;
|
||||
|
||||
return true ;
|
||||
return bRet ;
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -951,7 +951,7 @@ bool sockaddr_storage_ipv4_isExternalNet(const struct sockaddr_storage &addr)
|
||||
}
|
||||
|
||||
|
||||
bool sockaddr_storage_ipv6_isnull(const struct sockaddr_storage &addr)
|
||||
bool sockaddr_storage_ipv6_isnull(const struct sockaddr_storage &/*addr*/)
|
||||
{
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_ipv6_isnull() TODO";
|
||||
@ -961,7 +961,7 @@ bool sockaddr_storage_ipv6_isnull(const struct sockaddr_storage &addr)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool sockaddr_storage_ipv6_isValidNet(const struct sockaddr_storage &addr)
|
||||
bool sockaddr_storage_ipv6_isValidNet(const struct sockaddr_storage &/*addr*/)
|
||||
{
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_ipv6_isValidNet() TODO";
|
||||
@ -971,7 +971,7 @@ bool sockaddr_storage_ipv6_isValidNet(const struct sockaddr_storage &addr)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool sockaddr_storage_ipv6_isLoopbackNet(const struct sockaddr_storage &addr)
|
||||
bool sockaddr_storage_ipv6_isLoopbackNet(const struct sockaddr_storage &/*addr*/)
|
||||
{
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_ipv6_isLoopbackNet() TODO";
|
||||
@ -981,7 +981,7 @@ bool sockaddr_storage_ipv6_isLoopbackNet(const struct sockaddr_storage &addr)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool sockaddr_storage_ipv6_isPrivateNet(const struct sockaddr_storage &addr)
|
||||
bool sockaddr_storage_ipv6_isPrivateNet(const struct sockaddr_storage &/*addr*/)
|
||||
{
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_ipv6_isPrivateNet() TODO";
|
||||
@ -991,7 +991,7 @@ bool sockaddr_storage_ipv6_isPrivateNet(const struct sockaddr_storage &addr)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool sockaddr_storage_ipv6_isExternalNet(const struct sockaddr_storage &addr)
|
||||
bool sockaddr_storage_ipv6_isExternalNet(const struct sockaddr_storage &/*addr*/)
|
||||
{
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_ipv6_isExternalNet() TODO";
|
||||
|
Loading…
Reference in New Issue
Block a user