mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
Fixed some compiler warnings
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6419 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3b5bd220cf
commit
a304ffbab7
@ -1109,9 +1109,9 @@ int p3BitDht::minuteTick()
|
||||
getRelayRates(relayRead, relayWrite, relayRelayed);
|
||||
getDhtRates(dhtRead, dhtWrite);
|
||||
|
||||
#ifdef DEBUG_PEERNET_COMMON
|
||||
double denom = deltaT;
|
||||
|
||||
#ifdef DEBUG_PEERNET_COMMON
|
||||
std::cerr << "p3BitDht::minuteTick() ";
|
||||
std::cerr << "DhtRead: " << dhtRead / denom << " kB/s ";
|
||||
std::cerr << "DhtWrite: " << dhtWrite / denom << " kB/s ";
|
||||
|
@ -495,6 +495,8 @@ bool ftDataMultiplex::recvSingleChunkCRC(const std::string& peerId, const std::s
|
||||
|
||||
#ifdef MPLEX_DEBUG
|
||||
std::cerr << "ftDataMultiplex::recvSingleChunkCrc() Received crc of file " << hash << ", from peer id " << peerId << ", chunk " << chunk_number << ", crc=" << crc.toStdString() << std::endl;
|
||||
#else
|
||||
(void) peerId;
|
||||
#endif
|
||||
// remove this chunk from the request list as well.
|
||||
|
||||
|
@ -275,7 +275,7 @@ bool ftExtraList::cleanupOldFiles()
|
||||
}
|
||||
|
||||
|
||||
bool ftExtraList::cleanupEntry(std::string /*path*/, TransferRequestFlags flags)
|
||||
bool ftExtraList::cleanupEntry(std::string /*path*/, TransferRequestFlags /*flags*/)
|
||||
{
|
||||
// if (flags & RS_FILE_CONFIG_CLEANUP_DELETE)
|
||||
// {
|
||||
|
@ -1058,7 +1058,7 @@ bool PGPHandler::encryptDataBin(const PGPIdType& key_id,const void *data, const
|
||||
return res ;
|
||||
}
|
||||
|
||||
bool PGPHandler::decryptDataBin(const PGPIdType& key_id,const void *encrypted_data, const uint32_t encrypted_len, unsigned char *data, unsigned int *data_len)
|
||||
bool PGPHandler::decryptDataBin(const PGPIdType& /*key_id*/,const void *encrypted_data, const uint32_t encrypted_len, unsigned char *data, unsigned int *data_len)
|
||||
{
|
||||
int out_length ;
|
||||
unsigned char *out ;
|
||||
|
@ -799,7 +799,7 @@ std::string RsCertificate::toStdString_oldFormat() const
|
||||
return res ;
|
||||
}
|
||||
|
||||
bool RsCertificate::initFromString_oldFormat(const std::string& certstr,uint32_t& err_code)
|
||||
bool RsCertificate::initFromString_oldFormat(const std::string& certstr,uint32_t& /*err_code*/)
|
||||
{
|
||||
//parse the text to get ip address
|
||||
try
|
||||
|
@ -509,7 +509,7 @@ bool AuthGPG::getGPGFilteredList(std::list<std::string>& list,bool (*filter)(con
|
||||
return true ;
|
||||
}
|
||||
|
||||
static bool filter_Validity(const PGPCertificateInfo& info) { return true ; } //{ return info._validLvl >= PGPCertificateInfo::GPGME_VALIDITY_MARGINAL ; }
|
||||
static bool filter_Validity(const PGPCertificateInfo& /*info*/) { return true ; } //{ return info._validLvl >= PGPCertificateInfo::GPGME_VALIDITY_MARGINAL ; }
|
||||
static bool filter_Accepted(const PGPCertificateInfo& info) { return info._flags & PGPCertificateInfo::PGP_CERTIFICATE_FLAG_ACCEPT_CONNEXION ; }
|
||||
static bool filter_OwnSigned(const PGPCertificateInfo& info) { return info._flags & PGPCertificateInfo::PGP_CERTIFICATE_FLAG_HAS_OWN_SIGNATURE ; }
|
||||
|
||||
|
@ -1371,7 +1371,6 @@ RsFileSingleChunkCrcRequest *RsFileItemSerialiser::deserialiseChunkCrcReq(void *
|
||||
|
||||
/* skip the header */
|
||||
offset += 8;
|
||||
uint8_t tmp ;
|
||||
ok &= GetTlvString(data, *pktsize, &offset, TLV_TYPE_STR_VALUE, item->hash); // file hash
|
||||
ok &= getRawUInt32(data, rssize, &offset, &(item->chunk_number));
|
||||
|
||||
@ -1420,7 +1419,6 @@ RsFileSingleChunkCrc *RsFileItemSerialiser::deserialiseChunkCrc(void *data, uint
|
||||
|
||||
/* skip the header */
|
||||
offset += 8;
|
||||
uint8_t tmp ;
|
||||
ok &= GetTlvString(data, *pktsize, &offset, TLV_TYPE_STR_VALUE, item->hash); // file hash
|
||||
ok &= getRawUInt32(data, rssize, &offset, &(item->chunk_number));
|
||||
ok &= getRawUInt32(data, rssize, &offset, &(item->check_sum.fourbytes[0]));
|
||||
|
@ -2848,7 +2848,7 @@ void p3ChatService::cleanLobbyCaches()
|
||||
sendConnectionChallenge(*it) ;
|
||||
}
|
||||
|
||||
bool p3ChatService::handleTunnelRequest(const std::string& hash,const std::string& peer_id)
|
||||
bool p3ChatService::handleTunnelRequest(const std::string& hash,const std::string& /*peer_id*/)
|
||||
{
|
||||
RsStackMutex stack(mChatMtx); /********** STACK LOCKED MTX ******/
|
||||
|
||||
@ -2963,7 +2963,7 @@ static void printBinaryData(void *data,uint32_t size)
|
||||
#endif
|
||||
|
||||
void p3ChatService::receiveTurtleData( RsTurtleGenericTunnelItem *gitem,const std::string& hash,
|
||||
const std::string& virtual_peer_id,RsTurtleGenericTunnelItem::Direction direction)
|
||||
const std::string& virtual_peer_id,RsTurtleGenericTunnelItem::Direction /*direction*/)
|
||||
{
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
std::cerr << "p3ChatService::receiveTurtleData(): Received turtle data. " << std::endl;
|
||||
|
@ -1612,7 +1612,6 @@ RsMsgItem *p3MsgService::initMIRsMsg(MessageInfo &info, const std::string &to)
|
||||
// by the whole message serialized and binary encrypted, so as to obfuscate
|
||||
// all its content.
|
||||
//
|
||||
bool enc_ok = false ;
|
||||
|
||||
if(info.encryption_keys.find(to) != info.encryption_keys.end())
|
||||
encryptMessage(info.encryption_keys[to],msg) ;
|
||||
@ -1767,7 +1766,7 @@ bool p3MsgService::getDistantOfflineMessengingInvites(std::vector<DistantOffline
|
||||
|
||||
return true ;
|
||||
}
|
||||
bool p3MsgService::handleTunnelRequest(const std::string& hash,const std::string& peer_id)
|
||||
bool p3MsgService::handleTunnelRequest(const std::string& hash,const std::string& /*peer_id*/)
|
||||
{
|
||||
#ifdef DEBUG_DISTANT_MSG
|
||||
std::cerr << "p3MsgService::handleTunnelRequest: received TR for hash " << hash << std::endl;
|
||||
@ -1852,7 +1851,7 @@ void p3MsgService::manageDistantPeers()
|
||||
}
|
||||
}
|
||||
|
||||
void p3MsgService::addVirtualPeer(const TurtleFileHash& hash, const TurtleVirtualPeerId& vpid,RsTurtleGenericTunnelItem::Direction dir)
|
||||
void p3MsgService::addVirtualPeer(const TurtleFileHash& hash, const TurtleVirtualPeerId& vpid,RsTurtleGenericTunnelItem::Direction /*dir*/)
|
||||
{
|
||||
RsStackMutex stack(mMsgMtx); /********** STACK LOCKED MTX ******/
|
||||
// A new tunnel has been created. We need to flush pending messages for the corresponding peer.
|
||||
@ -1869,7 +1868,7 @@ void p3MsgService::addVirtualPeer(const TurtleFileHash& hash, const TurtleVirtua
|
||||
std::cerr << "p3MsgService::addVirtualPeer(): adding virtual peer " << vpid << " for hash " << hash << std::endl;
|
||||
#endif
|
||||
}
|
||||
void p3MsgService::removeVirtualPeer(const TurtleFileHash& hash, const TurtleVirtualPeerId& vpid)
|
||||
void p3MsgService::removeVirtualPeer(const TurtleFileHash& hash, const TurtleVirtualPeerId& /*vpid*/)
|
||||
{
|
||||
RsStackMutex stack(mMsgMtx); /********** STACK LOCKED MTX ******/
|
||||
// A new tunnel has been created. We need to flush pending messages for the corresponding peer.
|
||||
@ -1952,7 +1951,7 @@ void p3MsgService::sendTurtleData(const std::string& hash,RsMsgItem *msgitem)
|
||||
}
|
||||
|
||||
void p3MsgService::receiveTurtleData(RsTurtleGenericTunnelItem *gitem,const std::string& hash,
|
||||
const std::string& virtual_peer_id,RsTurtleGenericTunnelItem::Direction direction)
|
||||
const std::string& virtual_peer_id,RsTurtleGenericTunnelItem::Direction /*direction*/)
|
||||
{
|
||||
RsTurtleGenericDataItem *item = dynamic_cast<RsTurtleGenericDataItem*>(gitem) ;
|
||||
|
||||
@ -1967,6 +1966,8 @@ void p3MsgService::receiveTurtleData(RsTurtleGenericTunnelItem *gitem,const std:
|
||||
std::cerr << " data = " ;
|
||||
printBinaryData(item->data_bytes,item->data_size) ;
|
||||
std::cerr << std::endl;
|
||||
#else
|
||||
(void) virtual_peer_id;
|
||||
#endif
|
||||
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ class RsTurtleClientService
|
||||
// The output info_string is used by the turtle router to display info about tunnels it manages. It is
|
||||
// not passed to the tunnel.
|
||||
|
||||
virtual bool handleTunnelRequest(const std::string& hash,const std::string& peer_id) { return false ; }
|
||||
virtual bool handleTunnelRequest(const std::string& /*hash*/,const std::string& /*peer_id*/) { return false ; }
|
||||
|
||||
// This method is called by the turtle router to send data that comes out of a turtle tunnel.
|
||||
// The turtle router stays responsible for the memory management of data. Most of the time the
|
||||
@ -65,7 +65,7 @@ class RsTurtleClientService
|
||||
// By default (if not overloaded), the method will just free the data, as any subclass should do as well.
|
||||
// Note: p3turtle stays owner of the item, so the client should not delete it!
|
||||
//
|
||||
virtual void receiveTurtleData(RsTurtleGenericTunnelItem *item,const std::string& hash,const std::string& virtual_peer_id,RsTurtleGenericTunnelItem::Direction direction)
|
||||
virtual void receiveTurtleData(RsTurtleGenericTunnelItem */*item*/,const std::string& /*hash*/,const std::string& /*virtual_peer_id*/,RsTurtleGenericTunnelItem::Direction /*direction*/)
|
||||
{
|
||||
std::cerr << "!!!!!! Received Data from turtle router, but the client service is not handling it !!!!!!!!!!" << std::endl ;
|
||||
}
|
||||
@ -75,7 +75,7 @@ class RsTurtleClientService
|
||||
// services might only use the generic item already provided by the turtle
|
||||
// router: RsTurtleGenericDataItem
|
||||
|
||||
virtual RsTurtleGenericTunnelItem *deserialiseItem(void *data, uint32_t size) const { return NULL ; }
|
||||
virtual RsTurtleGenericTunnelItem *deserialiseItem(void */*data*/, uint32_t /*size*/) const { return NULL ; }
|
||||
|
||||
// These methods are called by the turtle router to add/remove virtual peers when tunnels are created/deleted
|
||||
//
|
||||
|
@ -66,8 +66,8 @@ virtual bool getInternalAddress(struct sockaddr_in &addr);
|
||||
virtual bool getExternalAddress(struct sockaddr_in &addr);
|
||||
|
||||
/* TO IMPLEMENT: New Port Forward interface to support as many ports as necessary */
|
||||
virtual bool requestPortForward(const PortForwardParams ¶ms) { return false; }
|
||||
virtual bool statusPortForward(const uint32_t fwdId, PortForwardParams ¶ms) { return false; }
|
||||
virtual bool requestPortForward(const PortForwardParams &/*params*/) { return false; }
|
||||
virtual bool statusPortForward(const uint32_t /*fwdId*/, PortForwardParams &/*params*/) { return false; }
|
||||
|
||||
/* Public functions - for background thread operation,
|
||||
* but effectively private from rest of RS, as in derived class
|
||||
|
Loading…
Reference in New Issue
Block a user