Removed unused parameter warnings in libretroshare.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4558 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-08-12 13:42:30 +00:00
parent 27842b8592
commit c6beee44ec
61 changed files with 1047 additions and 983 deletions

View File

@ -280,13 +280,13 @@ bool CacheStore::getStoredCache(CacheData &data)
return ok;
}
bool CacheStore::cached(const std::string cacheId)
bool CacheStore::cached(const std::string /*cacheId*/)
{
return false;
}
void CacheStore::updateCacheDocument(pugi::xml_document& cacheDoc)
void CacheStore::updateCacheDocument(pugi::xml_document& /*cacheDoc*/)
{
return;
}

View File

@ -1257,7 +1257,7 @@ std::string FileIndexMonitor::locked_findRealRoot(std::string rootdir) const
return realroot;
}
int FileIndexMonitor::RequestDirDetails(std::string uid, std::string path, DirDetails &details) const
int FileIndexMonitor::RequestDirDetails(std::string uid, std::string /*path*/, DirDetails &/*details*/) const
{
/* lock it up */
RsStackMutex mutex(fiMutex) ;
@ -1273,6 +1273,9 @@ uint32_t FileIndexMonitor::getType(void *ref) const
}
int FileIndexMonitor::RequestDirDetails(void *ref, DirDetails &details, uint32_t flags) const
{
/* remove unused parameter warnings */
(void) flags;
RsStackMutex mutex(fiMutex) ;
#ifdef FIM_DEBUG2

View File

@ -717,7 +717,7 @@ int FileIndex::printFileIndex(std::ostream &out)
return 1;
}
int FileIndex::loadIndex(const std::string& filename, const std::string& expectedHash, uint64_t size)
int FileIndex::loadIndex(const std::string& filename, const std::string& expectedHash, uint64_t /*size*/)
{
std::ifstream file (filename.c_str(), std::ifstream::binary);
if (!file)

View File

@ -161,7 +161,7 @@ int FileIndexStore::loadCache(const CacheData &data)
/* Search Interface - For Directory Access */
int FileIndexStore::RequestDirDetails(std::string uid, std::string path, DirDetails &details) const
int FileIndexStore::RequestDirDetails(std::string uid, std::string /*path*/, DirDetails &/*details*/) const
{
/* lock it up */
lockData();
@ -187,6 +187,9 @@ int FileIndexStore::RequestDirDetails(std::string uid, std::string path, DirDeta
int FileIndexStore::RequestDirDetails(void *ref, DirDetails &details, uint32_t flags) const
{
/* remove unused parameter warnings */
(void) flags;
#ifdef FIS_DEBUG
std::cerr << "FileIndexStore::RequestDirDetails() ref=" << ref << " flags: " << flags << std::endl;
#endif

View File

@ -1029,9 +1029,9 @@ bool PeerConnectStateBox::storeProxyPortChoice(uint32_t flags, bool useProxyPort
bool PeerConnectStateBox::getProxyPortChoice()
{
#ifdef DEBUG_CONNECTBOX
time_t now = time(NULL);
#ifdef DEBUG_CONNECTBOX
std::cerr << "PeerConnectStateBox::getProxyPortChoice() Using ConnectLogic Info from: ";
std::cerr << now-mProxyPortTS << " ago. Flags: " << mProxyPortFlags;
std::cerr << " UseProxyPort? " << mProxyPortChoice;

View File

@ -297,20 +297,22 @@ bool p3BitDht::dropPeer(std::string pid)
/* extract current peer status */
bool p3BitDht::getPeerStatus(std::string id,
struct sockaddr_in &laddr, struct sockaddr_in &raddr,
uint32_t &type, uint32_t &mode)
struct sockaddr_in &/*laddr*/, struct sockaddr_in &/*raddr*/,
uint32_t &/*type*/, uint32_t &/*mode*/)
{
/* remove unused parameter warnings */
(void) id;
#ifdef DEBUG_BITDHT
std::cerr << "p3BitDht::getPeerStatus(" << id << ")";
std::cerr << std::endl;
#endif
return false;
}
bool p3BitDht::getExternalInterface(struct sockaddr_in &raddr,
uint32_t &mode)
bool p3BitDht::getExternalInterface(struct sockaddr_in &/*raddr*/,
uint32_t &/*mode*/)
{
#ifdef DEBUG_BITDHT

View File

@ -42,7 +42,7 @@ void convertUdpRelayProxytoRsDhtRelayProxy(RsDhtRelayProxy &proxy, const UdpRela
********** External RsDHT Interface (defined in libretroshare/src/retroshare/rsdht.h) *********
************************************************************************************************/
uint32_t p3BitDht::getNetState(uint32_t type)
uint32_t p3BitDht::getNetState(uint32_t /*type*/)
{
return 1;

View File

@ -171,8 +171,10 @@ int p3BitDht::PeerCallback(const bdId *id, uint32_t status)
int p3BitDht::OnlinePeerCallback_locked(const bdId *id, uint32_t status, DhtPeerDetails *dpd)
int p3BitDht::OnlinePeerCallback_locked(const bdId *id, uint32_t /*status*/, DhtPeerDetails *dpd)
{
/* remove unused parameter warnings */
(void) id;
if ((dpd->mPeerConnectState != RSDHT_PEERCONN_DISCONNECTED) ||
(dpd->mPeerReqState == RSDHT_PEERREQ_RUNNING))
@ -193,7 +195,7 @@ int p3BitDht::OnlinePeerCallback_locked(const bdId *id, uint32_t status, DhtPeer
/* work out network state */
uint32_t connectFlags = dpd->mConnectLogic.connectCb(CSB_CONNECT_DIRECT,
mNetMgr->getNetworkMode(), mNetMgr->getNatHoleMode(), mNetMgr->getNatTypeMode());
bool useProxyPort = (connectFlags & CSB_ACTION_PROXY_PORT);
// bool useProxyPort = (connectFlags & CSB_ACTION_PROXY_PORT);
switch(connectFlags & CSB_ACTION_MASK_MODE)
{
@ -275,7 +277,7 @@ int p3BitDht::OnlinePeerCallback_locked(const bdId *id, uint32_t status, DhtPeer
int p3BitDht::UnreachablePeerCallback_locked(const bdId *id, uint32_t status, DhtPeerDetails *dpd)
int p3BitDht::UnreachablePeerCallback_locked(const bdId *id, uint32_t /*status*/, DhtPeerDetails *dpd)
{
if ((dpd->mPeerConnectState != RSDHT_PEERCONN_DISCONNECTED) ||
@ -343,7 +345,6 @@ int p3BitDht::UnreachablePeerCallback_locked(const bdId *id, uint32_t status, Dh
if (connectOk)
{
time_t now = time(NULL);
/* Push Back PeerAction */
PeerAction ca;
ca.mType = PEERNET_ACTION_TYPE_CONNECT;
@ -385,7 +386,7 @@ int p3BitDht::UnreachablePeerCallback_locked(const bdId *id, uint32_t status, Dh
int p3BitDht::ValueCallback(const bdNodeId *id, std::string key, uint32_t status)
int p3BitDht::ValueCallback(const bdNodeId */*id*/, std::string /*key*/, uint32_t /*status*/)
{
std::cerr << "p3BitDht::ValueCallback() ERROR Does nothing!";
std::cerr << std::endl;
@ -1009,9 +1010,8 @@ int p3BitDht::tick()
minuteTick();
time_t now = time(NULL);
#ifdef DEBUG_PEERNET_COMMON
time_t now = time(NULL);
std::cerr << "p3BitDht::tick() TIME: " << ctime(&now) << std::endl;
std::cerr.flush();
#endif
@ -1591,6 +1591,8 @@ int p3BitDht::checkProxyAllowed(const bdId *srcId, const bdId *destId, int mode,
int p3BitDht::checkConnectionAllowed(const bdId *peerId, int mode)
{
(void) mode;
#ifdef DEBUG_PEERNET
std::cerr << "p3BitDht::checkConnectionAllowed() to: ";
bdStdPrintId(std::cerr,peerId);
@ -1837,7 +1839,6 @@ void p3BitDht::initiateConnection(const bdId *srcId, const bdId *proxyId, const
case BITDHT_CONNECT_MODE_PROXY:
{
time_t now = time(NULL);
bool useProxyPort = dpd->mConnectLogic.getProxyPortChoice();
#ifdef DEBUG_PEERNET

View File

@ -94,7 +94,7 @@ ftFileControl::ftFileControl(std::string fname,
return;
}
ftController::ftController(CacheStrapper *cs, ftDataMultiplex *dm, std::string configDir)
ftController::ftController(CacheStrapper *cs, ftDataMultiplex *dm, std::string /*configDir*/)
:CacheTransfer(cs), p3Config(CONFIG_TYPE_FT_CONTROL),
last_save_time(0),
last_clean_time(0),

View File

@ -69,78 +69,78 @@ bool ftDataSendPair::sendCRC32Map(const std::string& peer_id,const std::strin
return mDataRecv->recvCRC32Map(peer_id,hash,crcmap) ;
}
/* Client Send */
bool ftDataSendDummy::sendDataRequest(const std::string &peerId, const std::string &hash,
uint64_t size, uint64_t offset, uint32_t chunksize)
bool ftDataSendDummy::sendDataRequest(const std::string &/*peerId*/, const std::string &/*hash*/,
uint64_t /*size*/, uint64_t /*offset*/, uint32_t /*chunksize*/)
{
return true;
}
/* Server Send */
bool ftDataSendDummy::sendData(const std::string &peerId, const std::string &hash,
uint64_t size, uint64_t offset, uint32_t chunksize, void *data)
bool ftDataSendDummy::sendData(const std::string &/*peerId*/, const std::string &/*hash*/,
uint64_t /*size*/, uint64_t /*offset*/, uint32_t /*chunksize*/, void */*data*/)
{
return true;
}
/* Send a request for a chunk map */
bool ftDataSendDummy::sendChunkMapRequest(const std::string& peer_id,const std::string& hash,bool is_client)
bool ftDataSendDummy::sendChunkMapRequest(const std::string& /*peer_id*/,const std::string& /*hash*/,bool /*is_client*/)
{
return true;
}
/* Send a chunk map */
bool ftDataSendDummy::sendChunkMap(const std::string& peer_id,const std::string& hash, const CompressedChunkMap& cmap,bool is_client)
bool ftDataSendDummy::sendChunkMap(const std::string& /*peer_id*/,const std::string& /*hash*/, const CompressedChunkMap& /*cmap*/,bool /*is_client*/)
{
return true;
}
bool ftDataSendDummy::sendCRC32MapRequest(const std::string& peer_id,const std::string& hash)
bool ftDataSendDummy::sendCRC32MapRequest(const std::string& /*peer_id*/,const std::string& /*hash*/)
{
return true;
}
/* Send a chunk map */
bool ftDataSendDummy::sendCRC32Map(const std::string& peer_id,const std::string& hash, const CRC32Map& cmap)
bool ftDataSendDummy::sendCRC32Map(const std::string& /*peer_id*/,const std::string& /*hash*/, const CRC32Map& /*cmap*/)
{
return true;
}
/* Client Recv */
bool ftDataRecvDummy::recvData(const std::string &peerId, const std::string &hash,
uint64_t size, uint64_t offset, uint32_t chunksize, void *data)
bool ftDataRecvDummy::recvData(const std::string &/*peerId*/, const std::string &/*hash*/,
uint64_t /*size*/, uint64_t /*offset*/, uint32_t /*chunksize*/, void */*data*/)
{
return true;
}
/* Server Recv */
bool ftDataRecvDummy::recvDataRequest(const std::string &peerId, const std::string &hash,
uint64_t size, uint64_t offset, uint32_t chunksize)
bool ftDataRecvDummy::recvDataRequest(const std::string &/*peerId*/, const std::string &/*hash*/,
uint64_t /*size*/, uint64_t /*offset*/, uint32_t /*chunksize*/)
{
return true;
}
/* Send a request for a chunk map */
bool ftDataRecvDummy::recvChunkMapRequest(const std::string& peer_id,const std::string& hash,
bool is_client)
bool ftDataRecvDummy::recvChunkMapRequest(const std::string& /*peer_id*/,const std::string& /*hash*/,
bool /*is_client*/)
{
return true;
}
/* Send a chunk map */
bool ftDataRecvDummy::recvChunkMap(const std::string& peer_id,const std::string& hash,
const CompressedChunkMap& cmap,bool is_client)
bool ftDataRecvDummy::recvChunkMap(const std::string& /*peer_id*/,const std::string& /*hash*/,
const CompressedChunkMap& /*cmap*/,bool /*is_client*/)
{
return true;
}
bool ftDataRecvDummy::sendCRC32MapRequest(const std::string& peer_id,const std::string& hash)
bool ftDataRecvDummy::sendCRC32MapRequest(const std::string& /*peer_id*/,const std::string& /*hash*/)
{
return true ;
}
/* Send a chunk map */
bool ftDataRecvDummy::sendCRC32Map(const std::string& peer_id,const std::string& hash, const CompressedChunkMap& cmap)
bool ftDataRecvDummy::sendCRC32Map(const std::string& /*peer_id*/,const std::string& /*hash*/, const CompressedChunkMap& /*cmap*/)
{
return true ;
}

View File

@ -398,7 +398,7 @@ bool ftDataMultiplex::doWork()
return true;
}
bool ftDataMultiplex::recvCRC32Map(const std::string& peerId, const std::string& hash,const CRC32Map& crc_map)
bool ftDataMultiplex::recvCRC32Map(const std::string& /*peerId*/, const std::string& hash,const CRC32Map& crc_map)
{
RsStackMutex stack(dataMtx); /******* LOCK MUTEX ******/
@ -595,7 +595,7 @@ bool ftDataMultiplex::handleRecvServerChunkMapRequest(const std::string& peerId,
}
bool ftDataMultiplex::handleRecvData(const std::string& peerId,
const std::string& hash, uint64_t size,
const std::string& hash, uint64_t /*size*/,
uint64_t offset, uint32_t chunksize, void *data)
{
ftTransferModule *transfer_module = NULL ;

View File

@ -46,6 +46,9 @@ bool ftFiStore::search(const std::string &hash, uint32_t hintflags, FileInfo &in
* Still to see if concept is worthwhle
*/
/* remove unused parameter warnings */
(void) hintflags;
#ifdef DB_DEBUG
std::cerr << "ftFiStore::search(" << hash << "," << hintflags;
std::cerr << ")";
@ -375,6 +378,9 @@ ftCacheStrapper::ftCacheStrapper(p3LinkMgr *lm)
/* overloaded search function */
bool ftCacheStrapper::search(const std::string &hash, uint32_t hintflags, FileInfo &info) const
{
/* remove unused parameter warnings */
(void) hintflags;
#ifdef DB_DEBUG
std::cerr << "ftCacheStrapper::search(" << hash << "," << hintflags;
std::cerr << ")";

View File

@ -178,6 +178,9 @@ bool ftExtraList::addExtraFile(std::string path, std::string hash,
bool ftExtraList::removeExtraFile(std::string hash, uint32_t flags)
{
/* remove unused parameter warnings */
(void) flags;
#ifdef DEBUG_ELIST
std::cerr << "ftExtraList::removeExtraFile()";
std::cerr << " hash: " << hash;
@ -202,7 +205,7 @@ bool ftExtraList::removeExtraFile(std::string hash, uint32_t flags)
return true;
}
bool ftExtraList::moveExtraFile(std::string fname, std::string hash, uint64_t size,
bool ftExtraList::moveExtraFile(std::string fname, std::string hash, uint64_t /*size*/,
std::string destpath)
{
RsStackMutex stack(extMutex);
@ -269,7 +272,7 @@ bool ftExtraList::cleanupOldFiles()
}
bool ftExtraList::cleanupEntry(std::string path, uint32_t flags)
bool ftExtraList::cleanupEntry(std::string /*path*/, uint32_t flags)
{
if (flags & RS_FILE_CONFIG_CLEANUP_DELETE)
{
@ -329,7 +332,7 @@ bool ftExtraList::hashExtraFileDone(std::string path, FileInfo &info)
* Search Function - used by File Transfer
*
**/
bool ftExtraList::search(const std::string &hash, uint32_t hintflags, FileInfo &info) const
bool ftExtraList::search(const std::string &hash, uint32_t /*hintflags*/, FileInfo &info) const
{
#ifdef DEBUG_ELIST

View File

@ -117,7 +117,7 @@ class ftFileCreator: public ftFileProvider
// This is overloads ftFileProvider, but returns false, because we can't ensure that unchecked chunks
// will provide a CRC32 that is faithful to the original hash.
//
virtual bool getCRC32Map(CRC32Map& crc_map) { return false ; }
virtual bool getCRC32Map(CRC32Map& /*crc_map*/) { return false ; }
// This is called when receiving the availability map from a source peer, for the file being handled.
//

View File

@ -180,8 +180,11 @@ bool ftFileSearch::search(const std::string &hash, uint32_t hintflags, FileInfo
}
bool ftSearchDummy::search(std::string hash, uint32_t hintflags, FileInfo &info) const
bool ftSearchDummy::search(std::string /*hash*/, uint32_t hintflags, FileInfo &/*info*/) const
{
/* remove unused parameter warnings */
(void) hintflags;
#ifdef DEBUG_SEARCH
std::cerr << "ftSearchDummy::search(" << hash ;
std::cerr << ", " << hintflags << ");";

View File

@ -58,8 +58,8 @@ const int ftserverzone = 29539;
/* Setup */
ftServer::ftServer(p3PeerMgr *pm, p3LinkMgr *lm)
: mP3iface(NULL),
mLinkMgr(lm), mPeerMgr(pm),
: mP3iface(NULL), mPeerMgr(pm),
mLinkMgr(lm),
mCacheStrapper(NULL),
mFiStore(NULL), mFiMon(NULL),
mFtController(NULL), mFtExtra(NULL),
@ -93,7 +93,7 @@ void ftServer::setP3Interface(P3Interface *pqi)
/* Control Interface */
/* add Config Items (Extra, Controller) */
void ftServer::addConfigComponents(p3ConfigMgr *mgr)
void ftServer::addConfigComponents(p3ConfigMgr */*mgr*/)
{
/* NOT SURE ABOUT THIS ONE */
}
@ -361,7 +361,7 @@ bool ftServer::getDownloadSpeed(const std::string hash, int & speed)
return ret;
}
bool ftServer::clearDownload(const std::string hash)
bool ftServer::clearDownload(const std::string /*hash*/)
{
return true ;
}
@ -742,18 +742,18 @@ RsSerialiser *ftServer::setupSerialiser()
return NULL;
}
bool ftServer::saveList(bool &cleanup, std::list<RsItem *>& list)
bool ftServer::saveList(bool &/*cleanup*/, std::list<RsItem *>& /*list*/)
{
return true;
}
bool ftServer::loadList(std::list<RsItem *>& load)
bool ftServer::loadList(std::list<RsItem *>& /*load*/)
{
return true;
}
bool ftServer::loadConfigMap(std::map<std::string, std::string> &configMap)
bool ftServer::loadConfigMap(std::map<std::string, std::string> &/*configMap*/)
{
return true;
}

View File

@ -979,6 +979,9 @@ bool ftTransferModule::locked_tickPeerTransfer(peerInfo &info)
bool ftTransferModule::locked_recvPeerData(peerInfo &info, uint64_t offset,
uint32_t chunk_size, void *data)
{
/* remove unused parameter warnings */
(void) data;
#ifdef FT_DEBUG
std::cerr << "ftTransferModule::locked_recvPeerData()";
std::cerr << " peerId: " << info.peerId;

View File

@ -98,7 +98,7 @@ gpgcert::~gpgcert()
}
#define GPG_DEBUG2
gpg_error_t pgp_pwd_callback(void *hook, const char *uid_hint, const char *passphrase_info, int prev_was_bad, int fd)
gpg_error_t pgp_pwd_callback(void */*hook*/, const char *uid_hint, const char */*passphrase_info*/, int prev_was_bad, int fd)
{
#ifdef GPG_DEBUG2
fprintf(stderr, "pgp_pwd_callback() called.\n");
@ -1072,7 +1072,7 @@ bool AuthGPGimpl::active()
return ((gpgmeInit) && (gpgmeKeySelected));
}
bool AuthGPGimpl::GeneratePGPCertificate(std::string name, std::string email, std::string passwd, std::string &pgpId, std::string &errString) {
bool AuthGPGimpl::GeneratePGPCertificate(std::string name, std::string email, std::string passwd, std::string &pgpId, std::string &/*errString*/) {
RsStackMutex stack(gpgMtxEngine); /******* LOCKED ******/
@ -1355,6 +1355,9 @@ std::string AuthGPGimpl::SaveCertificateToString(const std::string &id,bool incl
#ifdef GPGME_EXPORT_MODE_MINIMAL
gpgme_export_mode_t export_mode = include_signatures?0:GPGME_EXPORT_MODE_MINIMAL ;
#else
/* remove unused parameter warnings */
(void) include_signatures;
unsigned int export_mode = 0 ;
#endif
@ -1523,6 +1526,8 @@ bool AuthGPGimpl::AllowConnection(const std::string &gpg_id, bool accept)
/* These take PGP Ids */
bool AuthGPGimpl::SignCertificateLevel0(const std::string &id)
{
/* remove unused parameter warnings */
(void) id;
#ifdef GPG_DEBUG
std::cerr << "AuthGPGimpl::SignCertificat(" << id << ")" << std::endl;
@ -1543,6 +1548,9 @@ bool AuthGPGimpl::RevokeCertificate(const std::string &id)
{
//RsStackMutex stack(gpgMtx); /******* LOCKED ******/
/* remove unused parameter warnings */
(void) id;
#ifdef GPG_DEBUG
std::cerr << "AuthGPGimpl::RevokeCertificate(" << id << ") not implemented yet" << std::endl;
#endif
@ -1656,7 +1664,7 @@ int AuthGPGimpl::privateSignCertificate(const std::string &id)
}
/* revoke the signature on Certificate */
int AuthGPGimpl::privateRevokeCertificate(const std::string &id)
int AuthGPGimpl::privateRevokeCertificate(const std::string &/*id*/)
{
//RsStackMutex stack(gpgMtx); /******* LOCKED ******/
@ -2401,7 +2409,9 @@ void cleanupZombies(int numkill)
//std::cerr << "cleanupZombies() Killed " << i << " zombies";
//std::cerr << std::endl;
#else
/* remove unused parameter warnings */
(void) numkill;
#endif
return;

View File

@ -821,7 +821,6 @@ bool p3Config::getHashAttempt(const std::string& loadHash, std::string& hashstr,
std::list<RsItem *>::iterator it;
uint32_t bioflags = BIN_FLAGS_HASH_DATA | BIN_FLAGS_READABLE;
uint32_t stream_flags = BIN_FLAGS_READABLE;
BinInterface *bio = new BinFileInterface(cfg_fname.c_str(), bioflags);
PQInterface *stream = NULL;

View File

@ -1328,13 +1328,13 @@ bool p3DhtMgr::dhtActive()
return true;
}
bool p3DhtMgr::publishDHT(std::string key, std::string value, uint32_t ttl)
bool p3DhtMgr::publishDHT(std::string /*key*/, std::string /*value*/, uint32_t /*ttl*/)
{
std::cerr << "p3DhtMgr::publishDHT() DUMMY FN" << std::endl;
return false;
}
bool p3DhtMgr::searchDHT(std::string idhash)
bool p3DhtMgr::searchDHT(std::string /*idhash*/)
{
std::cerr << "p3DhtMgr::searchDHT() DUMMY FN" << std::endl;
return false;
@ -1354,6 +1354,9 @@ bool p3DhtMgr::dhtPublish(std::string idhash,
struct sockaddr_in &laddr, struct sockaddr_in &raddr,
uint32_t type, std::string sign)
{
/* remove unused parameter warnings */
(void) sign;
/* ... goes and searches */
#ifdef DHT_DEBUG
std::cerr << "p3DhtMgr::dhtPublish()" << std::endl;
@ -1404,7 +1407,7 @@ bool p3DhtMgr::dhtPublish(std::string idhash,
return publishDHT(idhash, value, DHT_TTL_PUBLISH);
}
bool p3DhtMgr::dhtNotify(std::string idhash, std::string ownIdHash, std::string sign)
bool p3DhtMgr::dhtNotify(std::string idhash, std::string ownIdHash, std::string /*sign*/)
{
#ifdef DHT_DEBUG
std::cerr << "p3DhtMgr::dhtNotify()" << std::endl;
@ -1418,7 +1421,7 @@ bool p3DhtMgr::dhtNotify(std::string idhash, std::string ownIdHash, std::string
return publishDHT(idhash, value.str(), DHT_TTL_NOTIFY);
}
bool p3DhtMgr::dhtSearch(std::string idhash, uint32_t mode)
bool p3DhtMgr::dhtSearch(std::string idhash, uint32_t /*mode*/)
{
#ifdef DHT_DEBUG
std::cerr << "p3DhtMgr::dhtSearch()" << std::endl;
@ -1429,7 +1432,7 @@ bool p3DhtMgr::dhtSearch(std::string idhash, uint32_t mode)
}
bool p3DhtMgr::dhtBootstrap(std::string storehash, std::string ownIdHash, std::string sign)
bool p3DhtMgr::dhtBootstrap(std::string storehash, std::string ownIdHash, std::string /*sign*/)
{
#ifdef DHT_DEBUG
std::cerr << "p3DhtMgr::dhtBootstrap()" << std::endl;
@ -1681,7 +1684,7 @@ bool p3DhtMgr::dhtResultNotify(std::string idhash)
bool p3DhtMgr::dhtResultSearch(std::string idhash,
struct sockaddr_in &laddr, struct sockaddr_in &raddr,
uint32_t type, std::string sign)
uint32_t type, std::string /*sign*/)
{
dhtMtx.lock(); /* LOCK MUTEX */

View File

@ -294,8 +294,6 @@ void p3LinkMgrIMPL::setFriendVisibility(const std::string &id, bool isVisible
{
RsStackMutex stack(mLinkMtx); /****** STACK LOCK MUTEX *******/
int count = 0;
std::map<std::string, peerConnectState>::iterator it;
it = mFriendList.find(id);
if (it == mFriendList.end())

View File

@ -1166,8 +1166,6 @@ bool p3NetMgrIMPL::setNetworkMode(uint32_t netMode)
bool p3NetMgrIMPL::setVisState(uint32_t visState)
{
uint32_t netMode;
{
RsStackMutex stack(mNetMtx); /****** STACK LOCK MUTEX *******/
mVisState = visState;
@ -1177,7 +1175,7 @@ bool p3NetMgrIMPL::setVisState(uint32_t visState)
{
enableNetAssistConnect(!(mVisState & RS_VIS_STATE_NODHT));
}
}
return true;
}
@ -1434,9 +1432,9 @@ bool p3NetMgrIMPL::netAssistStatusUpdate(std::string id, int state)
}
bool p3NetMgrIMPL::netAssistSetAddress( struct sockaddr_in &laddr,
struct sockaddr_in &eaddr,
uint32_t mode)
bool p3NetMgrIMPL::netAssistSetAddress( struct sockaddr_in &/*laddr*/,
struct sockaddr_in &/*eaddr*/,
uint32_t /*mode*/)
{
#if 0
std::map<uint32_t, pqiNetAssistConnect *>::iterator it;

View File

@ -270,7 +270,7 @@ virtual std::string PeerId() { return peerId; }
virtual int getConnectAddress(struct sockaddr_in &raddr) = 0;
virtual bool connect_parameter(uint32_t type, uint32_t value) = 0;
virtual bool connect_additional_address(uint32_t type, struct sockaddr_in *addr) { return false; } // only needed by udp.
virtual bool connect_additional_address(uint32_t /*type*/, struct sockaddr_in */*addr*/) { return false; } // only needed by udp.
protected:
PQInterface *parent() { return p; }

View File

@ -631,7 +631,7 @@ int NetBinDummy::tick()
return 0;
}
int NetBinDummy::senddata(void *data, int len)
int NetBinDummy::senddata(void */*data*/, int len)
{
std::cerr << "NetBinDummy::senddata() ";
printNetBinID(std::cerr, PeerId(), type);
@ -642,7 +642,7 @@ int NetBinDummy::senddata(void *data, int len)
return 0;
}
int NetBinDummy::readdata(void *data, int len)
int NetBinDummy::readdata(void */*data*/, int /*len*/)
{
std::cerr << "NetBinDummy::readdata() ";
printNetBinID(std::cerr, PeerId(), type);

View File

@ -190,7 +190,7 @@ bool pqihandler::RemoveSearchModule(SearchModule *mod)
}
// dummy output check
int pqihandler::locked_checkOutgoingRsItem(RsItem *item, int global)
int pqihandler::locked_checkOutgoingRsItem(RsItem */*item*/, int /*global*/)
{
//pqioutput(PQL_DEBUG_BASIC, pqihandlerzone, "pqihandler::checkOutgoingPQItem() NULL fn");

View File

@ -47,7 +47,7 @@ virtual RsItem *GetItem();
virtual int tick();
virtual int status();
virtual int notifyEvent(NetInterface *ni, int event) { return 0; } /* Not used */
virtual int notifyEvent(NetInterface */*ni*/, int /*event*/) { return 0; } /* Not used */
private:
std::list<RsItem *> objs;
};

View File

@ -105,7 +105,7 @@ void pqiNetStateBox::setAddressWebIP(bool active, struct sockaddr_in *addr)
}
void pqiNetStateBox::setPortForwarded(bool active, uint16_t port)
void pqiNetStateBox::setPortForwarded(bool /*active*/, uint16_t port)
{
if ((!mPortForwardSet) || (mPortForwarded != port))

View File

@ -788,7 +788,7 @@ int unix_close(int fd)
return ret;
}
int unix_socket(int domain, int type, int protocol)
int unix_socket(int /*domain*/, int /*type*/, int /*protocol*/)
{
int osock = socket(PF_INET, SOCK_STREAM, 0);

View File

@ -694,14 +694,14 @@ bool pqipersongrp::notifyConnect(std::string id, uint32_t ptype, bool success
#include "pqi/pqibin.h"
pqilistener * pqipersongrpDummy::createListener(struct sockaddr_in laddr)
pqilistener * pqipersongrpDummy::createListener(struct sockaddr_in /*laddr*/)
{
pqilistener *listener = new pqilistener();
return listener;
}
pqiperson * pqipersongrpDummy::createPerson(std::string id, pqilistener *listener)
pqiperson * pqipersongrpDummy::createPerson(std::string id, pqilistener */*listener*/)
{
{
std::ostringstream out;

View File

@ -54,14 +54,14 @@ int secpolicy_delete(SecurityPolicy *p)
}
int secpolicy_limit(SecurityPolicy *limiter,
SecurityPolicy *alter)
int secpolicy_limit(SecurityPolicy */*limiter*/,
SecurityPolicy */*alter*/)
{
return 1;
}
int secpolicy_check(SecurityPolicy *, int type_transaction,
int direction)
int secpolicy_check(SecurityPolicy *, int /*type_transaction*/,
int /*direction*/)
{
return 1;
}

View File

@ -500,7 +500,7 @@ int pqissllistenbase::closeConnection(int fd, SSL *ssl)
int pqissllistenbase::Extract_Failed_SSL_Certificate(SSL *ssl, struct sockaddr_in *inaddr)
int pqissllistenbase::Extract_Failed_SSL_Certificate(SSL *ssl, struct sockaddr_in */*inaddr*/)
{
pqioutput(PQL_DEBUG_BASIC, pqissllistenzone,
"pqissllistenbase::Extract_Failed_SSL_Certificate()");
@ -614,7 +614,7 @@ int pqissllistenbase::finaliseAccepts()
return 1;
}
int pqissllistenbase::isSSLActive(int fd, SSL *ssl)
int pqissllistenbase::isSSLActive(int /*fd*/, SSL *ssl)
{
/* can we just get error? */
@ -893,7 +893,6 @@ int pqissllistener::completeConnection(int fd, SSL *ssl, struct sockaddr_in &rem
int pqissllistener::finaliseConnection(int fd, SSL *ssl, std::string peerId, struct sockaddr_in &remote_addr)
{
bool found = false;
std::map<std::string, pqissl *>::iterator it;
std::ostringstream out;

View File

@ -127,7 +127,7 @@ pqissltunnel::~pqissltunnel() {
/********** Implementation of NetInterface *************************/
int pqissltunnel::connect(struct sockaddr_in raddr) {
int pqissltunnel::connect(struct sockaddr_in /*raddr*/) {
#ifdef DEBUG_PQISSL_TUNNEL
std::cerr << "pqissltunnel::connect() called : " << PeerId() << std::endl;
#endif

View File

@ -421,7 +421,7 @@ int pqissludp::net_internal_SSL_set_fd(SSL *ssl, int fd)
return 1;
}
int pqissludp::net_internal_fcntl_nonblock(int fd)
int pqissludp::net_internal_fcntl_nonblock(int /*fd*/)
{
rslog(RSL_DEBUG_BASIC, pqissludpzone,
"pqissludp::net_internal_fcntl_nonblock()");

View File

@ -55,8 +55,8 @@
const int pqistorezone = 9511;
pqistore::pqistore(RsSerialiser *rss, const std::string &srcId, BinInterface *bio_in, int bio_flags_in)
:PQInterface(""), rsSerialiser(rss), bio(bio_in), bio_flags(bio_flags_in),
nextPkt(NULL), mSrcId(srcId)
:PQInterface(""), rsSerialiser(rss), bio_flags(bio_flags_in),
nextPkt(NULL), mSrcId(srcId), bio(bio_in)
{
{
std::ostringstream out;

View File

@ -681,7 +681,7 @@ int pem_passwd_cb(char *buf, int size, int rwflag, void *password)
}
/* XXX FIX */
bool CheckX509Certificate(X509 *x509)
bool CheckX509Certificate(X509 */*x509*/)
{
return true;

View File

@ -89,7 +89,7 @@ int RsServer::ConfigGetDataRates( float &inKb, float &outKb ) /* in kbrates
}
int RsServer::ConfigSetBootPrompt( bool on )
int RsServer::ConfigSetBootPrompt( bool /*on*/ )
{
return 1;

View File

@ -50,12 +50,12 @@ int RsServer::ClearInSubscribe()
return 1;
}
int RsServer::SetInBroadcast(std::string id, bool in) /* channel : channel broadcast */
int RsServer::SetInBroadcast(std::string /*id*/, bool /*in*/) /* channel : channel broadcast */
{
return 1;
}
int RsServer::SetInSubscribe(std::string id, bool in) /* channel : subscribed channels */
int RsServer::SetInSubscribe(std::string /*id*/, bool /*in*/) /* channel : subscribed channels */
{
return 1;
}

View File

@ -207,7 +207,7 @@ bool p3Peers::getFriendList(std::list<std::string> &ids)
// return true;
//}
bool p3Peers::getPeerCount (unsigned int *pnFriendCount, unsigned int *pnOnlineCount, bool ssl)
bool p3Peers::getPeerCount (unsigned int *pnFriendCount, unsigned int *pnOnlineCount, bool /*ssl*/)
{
#ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getPeerCount()" << std::endl;
@ -1079,7 +1079,7 @@ p3Peers::GetRetroshareInvite(const std::string& ssl_id,bool include_signatures)
//===========================================================================
bool p3Peers::loadCertificateFromFile(const std::string &fname, std::string &id, std::string &gpg_id)
bool p3Peers::loadCertificateFromFile(const std::string &/*fname*/, std::string &/*id*/, std::string &/*gpg_id*/)
{
#ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::LoadCertificateFromFile() not implemented yet";
@ -1306,8 +1306,11 @@ bool p3Peers::cleanCertificate(const std::string &certstr, std::string &cleanCer
return false;
}
bool p3Peers::saveCertificateToFile(const std::string &id, const std::string &fname)
bool p3Peers::saveCertificateToFile(const std::string &id, const std::string &/*fname*/)
{
/* remove unused parameter warnings */
(void) id;
#ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::SaveCertificateToFile() not implemented yet " << id;
std::cerr << std::endl;

View File

@ -97,17 +97,17 @@ bool p3ServerConfig::setConfigurationOption(uint32_t key, const std::string &opt
/* From RsIface::RsConfig */
int p3ServerConfig::getConfigNetStatus(RsConfigNetStatus &status)
int p3ServerConfig::getConfigNetStatus(RsConfigNetStatus &/*status*/)
{
return 0;
}
int p3ServerConfig::getConfigStartup(RsConfigStartup &params)
int p3ServerConfig::getConfigStartup(RsConfigStartup &/*params*/)
{
return 0;
}
int p3ServerConfig::getConfigDataRates(RsConfigDataRates &params)
int p3ServerConfig::getConfigDataRates(RsConfigDataRates &/*params*/)
{
return 0;
}
@ -147,7 +147,7 @@ bool p3ServerConfig::getAutoLogin()
return 0;
}
void p3ServerConfig::setAutoLogin(bool autoLogin)
void p3ServerConfig::setAutoLogin(bool /*autoLogin*/)
{
return;
}
@ -170,7 +170,7 @@ uint32_t p3ServerConfig::getUserLevel()
uint32_t userLevel = RSCONFIG_USER_LEVEL_NEW;
{
RsStackMutex stack(configMtx); /******* LOCKED MUTEX *****/
uint32_t userLevel = mUserLevel;
userLevel = mUserLevel;
}
switch(userLevel)

View File

@ -718,12 +718,12 @@ bool RsLoginHandler::getSSLPasswdFromGPGFile(const std::string& ssl_id,std::stri
}
std::string RsLoginHandler::getSSLPasswdFileName(const std::string& ssl_id)
std::string RsLoginHandler::getSSLPasswdFileName(const std::string& /*ssl_id*/)
{
return RsInit::RsConfigKeysDirectory() + "/" + "ssl_passphrase.pgp";
}
std::string RsLoginHandler::getAutologinFileName(const std::string& ssl_id)
std::string RsLoginHandler::getAutologinFileName(const std::string& /*ssl_id*/)
{
return RsInit::RsConfigKeysDirectory() + "/" + "help.dta" ;
}

View File

@ -662,7 +662,7 @@ std::ostream &RsDiscHeartbeat::print(std::ostream &out, uint16_t indent)
return out;
}
uint32_t RsDiscSerialiser::sizeHeartbeat(RsDiscHeartbeat *item)
uint32_t RsDiscSerialiser::sizeHeartbeat(RsDiscHeartbeat */*item*/)
{
uint32_t s = 8; /* header */

View File

@ -372,7 +372,7 @@ bool RsChatAvatarItem::serialise(void *data, uint32_t& pktsize)
return ok;
}
RsChatMsgItem::RsChatMsgItem(void *data,uint32_t size)
RsChatMsgItem::RsChatMsgItem(void *data,uint32_t /*size*/)
: RsChatItem(RS_PKT_SUBTYPE_DEFAULT)
{
uint32_t offset = 8; // skip the header
@ -393,7 +393,7 @@ RsChatMsgItem::RsChatMsgItem(void *data,uint32_t size)
std::cerr << "Unknown error while deserializing." << std::endl ;
}
RsPrivateChatMsgConfigItem::RsPrivateChatMsgConfigItem(void *data,uint32_t size)
RsPrivateChatMsgConfigItem::RsPrivateChatMsgConfigItem(void *data,uint32_t /*size*/)
: RsChatItem(RS_PKT_SUBTYPE_PRIVATECHATMSG_CONFIG)
{
uint32_t offset = 8; // skip the header
@ -420,7 +420,7 @@ RsPrivateChatMsgConfigItem::RsPrivateChatMsgConfigItem(void *data,uint32_t size)
}
/* set data from RsChatMsgItem to RsPrivateChatMsgConfigItem */
void RsPrivateChatMsgConfigItem::set(RsChatMsgItem *ci, const std::string &peerId, uint32_t confFlags)
void RsPrivateChatMsgConfigItem::set(RsChatMsgItem *ci, const std::string &/*peerId*/, uint32_t confFlags)
{
PeerId(ci->PeerId());
configPeerId = ci->PeerId();
@ -442,7 +442,7 @@ void RsPrivateChatMsgConfigItem::get(RsChatMsgItem *ci)
ci->recvTime = recvTime;
}
RsChatStatusItem::RsChatStatusItem(void *data,uint32_t size)
RsChatStatusItem::RsChatStatusItem(void *data,uint32_t /*size*/)
: RsChatItem(RS_PKT_SUBTYPE_CHAT_STATUS)
{
uint32_t offset = 8; // skip the header
@ -462,7 +462,7 @@ RsChatStatusItem::RsChatStatusItem(void *data,uint32_t size)
std::cerr << "Unknown error while deserializing." << std::endl ;
}
RsChatAvatarItem::RsChatAvatarItem(void *data,uint32_t size)
RsChatAvatarItem::RsChatAvatarItem(void *data,uint32_t /*size*/)
: RsChatItem(RS_PKT_SUBTYPE_CHAT_STATUS)
{
uint32_t offset = 8; // skip the header
@ -1144,7 +1144,7 @@ void RsMsgParentId::clear()
return;
}
uint32_t RsMsgSerialiser::sizeMsgParentIdItem(RsMsgParentId* item)
uint32_t RsMsgSerialiser::sizeMsgParentIdItem(RsMsgParentId* /*item*/)
{
uint32_t s = 8; /* header */

View File

@ -110,8 +110,8 @@ virtual ~RsPhotoSerialiser()
{ return; }
virtual uint32_t size(RsItem *) { return 0; }
virtual bool serialise (RsItem *item, void *data, uint32_t *size) { return false; }
virtual RsItem * deserialise(void *data, uint32_t *size) { return NULL; }
virtual bool serialise (RsItem */*item*/, void */*data*/, uint32_t */*size*/) { return false; }
virtual RsItem * deserialise(void */*data*/, uint32_t */*size*/) { return NULL; }
private:

View File

@ -202,7 +202,7 @@ uint32_t RsSerialType::size(RsItem *)
return 8;
}
bool RsSerialType::serialise(RsItem *item, void *data, uint32_t *size)
bool RsSerialType::serialise(RsItem */*item*/, void */*data*/, uint32_t */*size*/)
{
#ifdef RSSERIAL_DEBUG
std::cerr << "RsSerialType::serialise()" << std::endl;
@ -210,7 +210,7 @@ bool RsSerialType::serialise(RsItem *item, void *data, uint32_t *size)
return false;
}
RsItem * RsSerialType::deserialise(void *data, uint32_t *size)
RsItem * RsSerialType::deserialise(void */*data*/, uint32_t */*size*/)
{
#ifdef RSSERIAL_DEBUG
std::cerr << "RsSerialType::deserialise()" << std::endl;

View File

@ -60,7 +60,7 @@ std::ostream &RsStatusItem::print(std::ostream &out, uint16_t indent)
return out;
}
uint32_t RsStatusSerialiser::sizeItem(RsStatusItem *item)
uint32_t RsStatusSerialiser::sizeItem(RsStatusItem */*item*/)
{
uint32_t s = 8; /* header */
s += 4; /* sendTime */

View File

@ -817,7 +817,6 @@ bool RsTlvKeyValueSet::GetTlv(void *data, uint32_t size, uint32_t *offset) /* s
std::ostream &RsTlvKeyValueSet::print(std::ostream &out, uint16_t indent)
{
printBase(out, "RsTlvKeyValue", indent);
uint16_t int_Indent = indent + 2;
std::list<RsTlvKeyValue>::iterator it;

View File

@ -173,7 +173,7 @@ int test_TlvSet(std::vector<RsTlvItem *> items, int maxsize)
void *data = malloc(totalsize);
uint32_t size = totalsize;
int bytes = test_CreateTlvStack(std::cerr, items, data, &size);
test_CreateTlvStack(std::cerr, items, data, &size);
test_StepThroughTlvStack(std::cerr, data, size);
return 1;

View File

@ -100,7 +100,7 @@ std::ostream& RsVoipPongItem::print(std::ostream &out, uint16_t indent)
/*************************************************************************/
uint32_t RsVoipSerialiser::sizeVoipPingItem(RsVoipPingItem *item)
uint32_t RsVoipSerialiser::sizeVoipPingItem(RsVoipPingItem */*item*/)
{
uint32_t s = 8; /* header */
s += 4; /* seqno */
@ -200,7 +200,7 @@ RsVoipPingItem *RsVoipSerialiser::deserialiseVoipPingItem(void *data, uint32_t *
/*************************************************************************/
uint32_t RsVoipSerialiser::sizeVoipPongItem(RsVoipPongItem *item)
uint32_t RsVoipSerialiser::sizeVoipPongItem(RsVoipPongItem */*item*/)
{
uint32_t s = 8; /* header */
s += 4; /* seqno */

View File

@ -460,7 +460,7 @@ bool p3Channels::getMessageCount(const std::string cId, unsigned int &newCount,
return true;
}
bool p3Channels::channelExtraFileHash(std::string path, std::string chId, FileInfo& fInfo){
bool p3Channels::channelExtraFileHash(std::string path, std::string /*chId*/, FileInfo& fInfo){
// get file name
std::string fname, fnameBuff;
@ -533,7 +533,7 @@ RsSerialType *p3Channels::createSerialiser()
return new RsChannelSerialiser();
}
bool p3Channels::locked_checkDistribMsg(RsDistribMsg *msg)
bool p3Channels::locked_checkDistribMsg(RsDistribMsg */*msg*/)
{
return true;
}
@ -727,7 +727,7 @@ const uint32_t DOWNLOAD_PERIOD = 7 * 24 * 3600;
* on a subscription to a channel..
*/
bool p3Channels::locked_eventDuplicateMsg(GroupInfo *grp, RsDistribMsg *msg, const std::string& id, bool historical)
bool p3Channels::locked_eventDuplicateMsg(GroupInfo *grp, RsDistribMsg *msg, const std::string& id, bool /*historical*/)
{
std::string grpId = msg->grpId;
std::string msgId = msg->msgId;

View File

@ -843,7 +843,7 @@ void p3disc::recvDiscReply(RsDiscReply *dri)
void p3disc::removeFriend(std::string ssl_id)
void p3disc::removeFriend(std::string /*ssl_id*/)
{
// DON'T KNOW WHY SSL IDS were saved -> the results are never used
@ -1229,7 +1229,7 @@ RsSerialiser *p3disc::setupSerialiser()
return rss ;
}
bool p3disc::saveList(bool& cleanup, std::list<RsItem*>& lst)
bool p3disc::saveList(bool& cleanup, std::list<RsItem*>& /*lst*/)
{
#ifdef P3DISC_DEBUG
std::cerr << "p3disc::saveList() called" << std::endl;
@ -1272,10 +1272,10 @@ bool p3disc::loadList(std::list<RsItem*>& load)
std::list<RsItem *>::iterator it;
for(it = load.begin(); it != load.end(); it++)
{
RsConfigKeyValueSet *vitem = dynamic_cast<RsConfigKeyValueSet *>(*it);
// DON'T KNOW WHY SSL IDS were saved -> the results are never used
#if 0
RsConfigKeyValueSet *vitem = dynamic_cast<RsConfigKeyValueSet *>(*it);
if(vitem)
{
#ifdef P3DISC_DEBUG

View File

@ -4470,7 +4470,7 @@ void p3GroupDistrib::getGrpListPubKeyAvailable(std::list<std::string>& grpList)
}
bool p3GroupDistrib::locked_checkDistribMsg(
GroupInfo &gi, RsDistribMsg *msg)
GroupInfo &/*gi*/, RsDistribMsg *msg)
{
/* check timestamp */
@ -4804,7 +4804,7 @@ std::ostream &operator<<(std::ostream &out, const GroupInfo &info)
return out;
}
void p3GroupDistrib::locked_notifyGroupChanged(GroupInfo &info, uint32_t flags, bool historical)
void p3GroupDistrib::locked_notifyGroupChanged(GroupInfo &info, uint32_t /*flags*/, bool /*historical*/)
{
mGroupsChanged = true;
info.grpChanged = true;
@ -4876,7 +4876,7 @@ std::ostream &operator<<(std::ostream &out, const RsDistribDummyMsg &msg)
bool p3GroupDistrib::locked_CheckNewMsgDummies(GroupInfo &grp, RsDistribMsg *msg, std::string id, bool historical)
bool p3GroupDistrib::locked_CheckNewMsgDummies(GroupInfo &grp, RsDistribMsg *msg, std::string /*id*/, bool /*historical*/)
{
std::string threadId = msg->threadId;
std::string parentId = msg->parentId;

View File

@ -48,7 +48,7 @@ std::ostream &operator<<(std::ostream &out, const ForumInfo &info)
return out;
}
std::ostream &operator<<(std::ostream &out, const ThreadInfoSummary &info)
std::ostream &operator<<(std::ostream &out, const ThreadInfoSummary &/*info*/)
{
out << "ThreadInfoSummary:";
out << std::endl;
@ -58,7 +58,7 @@ std::ostream &operator<<(std::ostream &out, const ThreadInfoSummary &info)
return out;
}
std::ostream &operator<<(std::ostream &out, const ForumMsgInfo &info)
std::ostream &operator<<(std::ostream &out, const ForumMsgInfo &/*info*/)
{
out << "ForumMsgInfo:";
out << std::endl;
@ -482,20 +482,20 @@ RsSerialType *p3Forums::createSerialiser()
return new RsForumSerialiser();
}
bool p3Forums::locked_checkDistribMsg(RsDistribMsg *msg)
bool p3Forums::locked_checkDistribMsg(RsDistribMsg */*msg*/)
{
return true;
}
RsDistribGrp *p3Forums::locked_createPublicDistribGrp(GroupInfo &info)
RsDistribGrp *p3Forums::locked_createPublicDistribGrp(GroupInfo &/*info*/)
{
RsDistribGrp *grp = NULL; //new RsForumGrp();
return grp;
}
RsDistribGrp *p3Forums::locked_createPrivateDistribGrp(GroupInfo &info)
RsDistribGrp *p3Forums::locked_createPrivateDistribGrp(GroupInfo &/*info*/)
{
RsDistribGrp *grp = NULL; //new RsForumGrp();
@ -634,12 +634,12 @@ void p3Forums::locked_notifyGroupChanged(GroupInfo &grp, uint32_t flags, bool h
return p3GroupDistrib::locked_notifyGroupChanged(grp, flags, historical);
}
bool p3Forums::locked_eventDuplicateMsg(GroupInfo *grp, RsDistribMsg *msg, const std::string& id, bool historical)
bool p3Forums::locked_eventDuplicateMsg(GroupInfo */*grp*/, RsDistribMsg */*msg*/, const std::string& /*id*/, bool /*historical*/)
{
return true;
}
bool p3Forums::locked_eventNewMsg(GroupInfo *grp, RsDistribMsg *msg, const std::string& id, bool historical)
bool p3Forums::locked_eventNewMsg(GroupInfo */*grp*/, RsDistribMsg *msg, const std::string& /*id*/, bool historical)
{
std::string grpId = msg->grpId;
std::string msgId = msg->msgId;

View File

@ -480,6 +480,9 @@ bool p3GameLauncher::playGame(std::string gameId)
bool p3GameLauncher::quitGame(std::string gameId)
{
/* remove unused parameter warnings */
(void) gameId;
#ifdef GAME_DEBUG
std::cerr << "p3GameLauncher::checkGameProperties()";
std::cerr << " gameId: " << gameId;
@ -1231,7 +1234,7 @@ int p3GameLauncher::handleClientReady(RsGameItem *gi)
}
/* PAUSE / QUIT msg */
int p3GameLauncher::handleClientActive(RsGameItem *gi)
int p3GameLauncher::handleClientActive(RsGameItem */*gi*/)
{
#ifdef GAME_DEBUG
std::cerr << "p3GameLauncher::handleClientActive()";
@ -1282,7 +1285,7 @@ int p3GameLauncher::handleServerSetup(RsGameItem *gi)
/* This is a setup update from server
* only updates the players...
*/
int p3GameLauncher::handleServerActive(RsGameItem *gi)
int p3GameLauncher::handleServerActive(RsGameItem */*gi*/)
{
#ifdef GAME_DEBUG
std::cerr << "p3GameLauncher::handleServerActive()";

View File

@ -191,7 +191,7 @@ int p3MsgService::incomingMsgs()
return 1;
}
void p3MsgService::statusChange(const std::list<pqipeer> &plist)
void p3MsgService::statusChange(const std::list<pqipeer> &/*plist*/)
{
/* should do it properly! */
checkOutgoingMessages();

View File

@ -166,6 +166,9 @@ int p3PhotoService::loadCache(const CacheData &data)
void p3PhotoService::loadPhotoIndex(std::string filename, std::string hash, std::string src)
{
/* remove unused parameter warnings */
(void) hash;
/* create the serialiser to load info */
RsSerialiser *rsSerialiser = new RsSerialiser();
rsSerialiser->addSerialType(new RsPhotoSerialiser());
@ -283,7 +286,7 @@ bool p3PhotoService::loadPhotoShowItem(RsPhotoShowItem *item)
return true;
}
void p3PhotoService::availablePhoto(std::string filename, std::string hash, std::string src)
void p3PhotoService::availablePhoto(std::string /*filename*/, std::string /*hash*/, std::string /*src*/)
{
/* TODO */
return;
@ -467,7 +470,7 @@ bool p3PhotoService::getShowList(std::string id, std::list<std::string> &showIds
return true;
}
bool p3PhotoService::getShowDetails(std::string id, std::string showId, RsPhotoShowDetails &detail)
bool p3PhotoService::getShowDetails(std::string id, std::string showId, RsPhotoShowDetails &/*detail*/)
{
#ifdef PHOTO_DEBUG
std::cerr << "p3PhotoService::getShowDetails() pid: " << id;
@ -572,7 +575,7 @@ bool p3PhotoService::deleteShow(std::string showId)
}
bool p3PhotoService::addPhotoToShow(std::string showId, std::string photoId, int16_t index)
bool p3PhotoService::addPhotoToShow(std::string showId, std::string photoId, int16_t /*index*/)
{
#ifdef PHOTO_DEBUG
@ -612,12 +615,12 @@ bool p3PhotoService::addPhotoToShow(std::string showId, std::string photoId, int
return true;
}
bool p3PhotoService::movePhotoInShow(std::string showId, std::string photoId, int16_t index)
bool p3PhotoService::movePhotoInShow(std::string /*showId*/, std::string /*photoId*/, int16_t /*index*/)
{
return false;
}
bool p3PhotoService::removePhotoFromShow(std::string showId, std::string photoId)
bool p3PhotoService::removePhotoFromShow(std::string /*showId*/, std::string /*photoId*/)
{
return false;
}
@ -667,29 +670,29 @@ std::string p3PhotoService::addPhoto(std::string path) /* add from file */
bool p3PhotoService::addPhoto(std::string srcId, std::string photoId) /* add from peers photos */
bool p3PhotoService::addPhoto(std::string /*srcId*/, std::string /*photoId*/) /* add from peers photos */
{
return false;
}
bool p3PhotoService::deletePhoto(std::string photoId)
bool p3PhotoService::deletePhoto(std::string /*photoId*/)
{
return false;
}
/* modify properties (TODO) */
bool p3PhotoService::modifyShow(std::string showId, std::wstring name, std::wstring comment)
bool p3PhotoService::modifyShow(std::string /*showId*/, std::wstring /*name*/, std::wstring /*comment*/)
{
return false;
}
bool p3PhotoService::modifyPhoto(std::string photoId, std::wstring name, std::wstring comment)
bool p3PhotoService::modifyPhoto(std::string /*photoId*/, std::wstring /*name*/, std::wstring /*comment*/)
{
return false;
}
bool p3PhotoService::modifyShowComment(std::string showId, std::string photoId, std::wstring comment)
bool p3PhotoService::modifyShowComment(std::string /*showId*/, std::string /*photoId*/, std::wstring /*comment*/)
{
return false;
}

View File

@ -545,6 +545,9 @@ int UdpRelayReceiver::status(std::ostream &out)
/* higher level interface */
int UdpRelayReceiver::recvPkt(void *data, int size, struct sockaddr_in &from)
{
/* remove unused parameter warnings */
(void) from;
/* print packet information */
#ifdef DEBUG_UDP_RELAY
std::cerr << "UdpRelayReceiver::recvPkt(" << size << ") from: " << from;
@ -640,7 +643,7 @@ int UdpRelayReceiver::recvPkt(void *data, int size, struct sockaddr_in &from)
/* the address here must be the end point!,
* it cannot be proxy, as we could be using the same proxy for multiple connections.
*/
int UdpRelayReceiver::sendPkt(const void *data, int size, const struct sockaddr_in &to, int ttl)
int UdpRelayReceiver::sendPkt(const void *data, int size, const struct sockaddr_in &to, int /*ttl*/)
{
RsStackMutex stack(relayMtx); /********** LOCK MUTEX *********/

View File

@ -455,10 +455,14 @@ int UdpStunner::doStun(struct sockaddr_in stun_addr)
}
/* send it off */
int sentlen = sendPkt(stundata, tmplen, stun_addr, STUN_TTL);
#ifdef DEBUG_UDP_STUNNER
int sentlen =
#endif
sendPkt(stundata, tmplen, stun_addr, STUN_TTL);
{
RsStackMutex stack(stunMtx); /********** LOCK MUTEX *********/
time_t now = time(NULL);
mStunLastSendStun = now;
mStunLastSendAny = now;

View File

@ -271,7 +271,7 @@ class p3turtle: public p3Service, /*public pqiMonitor,*/ public RsTurtle,/* publ
/************* from p3Config *******************/
virtual RsSerialiser *setupSerialiser() ;
virtual bool saveList(bool& cleanup, std::list<RsItem*>&) ;
virtual bool loadList(std::list<RsItem*>& load) { return true; }
virtual bool loadList(std::list<RsItem*>& /*load*/) { return true; }
/************* Communication with ftserver *******************/
/// Does the turtle router manages tunnels to this peer ? (this is not a
@ -428,4 +428,3 @@ class p3turtle: public p3Service, /*public pqiMonitor,*/ public RsTurtle,/* publ
};
#endif

View File

@ -117,11 +117,17 @@ std::string CUPnPLib::GetUPnPErrorMessage(int code) const
std::string CUPnPLib::processUPnPErrorMessage(
const std::string &messsage,
const std::string &message,
int errorCode,
const DOMString errorString,
IXML_Document *doc) const
{
/* remove unused parameter warnings */
(void) message;
(void) errorCode;
(void) errorString;
(void) doc;
std::ostringstream msg;
#ifdef UPNP_DEBUG
if (errorString == NULL || *errorString == 0) {
@ -129,7 +135,7 @@ std::string CUPnPLib::processUPnPErrorMessage(
}
if (errorCode > 0) {
std::cerr << "CUPnPLib::processUPnPErrorMessage() Error: " <<
messsage <<
message <<
": Error code :'";
if (doc) {
CUPnPError e(*this, doc);
@ -146,7 +152,7 @@ std::string CUPnPLib::processUPnPErrorMessage(
std::cerr << std::endl;
} else {
std::cerr << "CUPnPLib::processUPnPErrorMessage() Error: " <<
messsage <<
message <<
": UPnP SDK error: " <<
GetUPnPErrorMessage(errorCode) <<
" (" << errorCode << ").";
@ -161,6 +167,9 @@ void CUPnPLib::ProcessActionResponse(
IXML_Document *RespDoc,
const std::string &actionName) const
{
/* remove unused parameter warnings */
(void) actionName;
std::ostringstream msg;
msg << "Response: ";
IXML_Element *root = Element_GetRootElement(RespDoc);
@ -356,7 +365,7 @@ CUPnPArgument::CUPnPArgument(
const CUPnPControlPoint &upnpControlPoint,
CUPnPLib &upnpLib,
IXML_Element *argument,
const std::string &SCPDURL)
const std::string &/*SCPDURL*/)
:
m_UPnPControlPoint(upnpControlPoint),
m_name (upnpLib.Element_GetChildValueByTag(argument, "name")),
@ -398,7 +407,7 @@ CUPnPAllowedValue::CUPnPAllowedValue(
const CUPnPControlPoint &upnpControlPoint,
CUPnPLib &upnpLib,
IXML_Element *allowedValue,
const std::string &SCPDURL)
const std::string &/*SCPDURL*/)
:
m_UPnPControlPoint(upnpControlPoint),
m_allowedValue(upnpLib.Element_GetTextValue(allowedValue))
@ -1593,6 +1602,9 @@ void CUPnPControlPoint::OnEventReceived(
int EventKey,
IXML_Document *ChangedVariablesDoc)
{
/* remove unused parameter warnings */
(void) EventKey;
#ifdef UPNP_DEBUG
std::cerr << "CUPnPControlPoint::OnEventReceived() UPNP_EVENT_RECEIVED:" <<
"\n SID: " << Sid <<

View File

@ -725,6 +725,10 @@ bool RsDirUtil::createBackup (const std::string& sFilename, unsigned int nCount)
getPqiNotify()->AddSysMessage (0, RS_SYS_WARNING, "File rename error", "Error while renaming file " + sFilename + " to " + sStream.str ());
return false;
}
#else
/* remove unused parameter warnings */
(void) sFilename;
(void) nCount;
#endif
return true;
}

View File

@ -46,6 +46,9 @@ class RsMutex
RsMutex(const std::string& name)
{
/* remove unused parameter warnings */
(void) name;
pthread_mutex_init(&realMutex, NULL);
#ifdef RSTHREAD_SELF_LOCKING_GUARD
_thread_id = 0 ;