mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 15:35:49 -04:00
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:
parent
27842b8592
commit
c6beee44ec
61 changed files with 1047 additions and 983 deletions
|
@ -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,28 +1526,33 @@ 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;
|
||||
std::cerr << "AuthGPGimpl::SignCertificat(" << id << ")" << std::endl;
|
||||
#endif
|
||||
|
||||
if (1 != privateSignCertificate(id))
|
||||
if (1 != privateSignCertificate(id))
|
||||
{
|
||||
storeAllKeys();
|
||||
storeAllKeys();
|
||||
return false;
|
||||
}
|
||||
|
||||
/* reload stuff now ... */
|
||||
/* reload stuff now ... */
|
||||
storeAllKeys();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AuthGPGimpl::RevokeCertificate(const std::string &id)
|
||||
{
|
||||
//RsStackMutex stack(gpgMtx); /******* LOCKED ******/
|
||||
//RsStackMutex stack(gpgMtx); /******* LOCKED ******/
|
||||
|
||||
/* remove unused parameter warnings */
|
||||
(void) id;
|
||||
|
||||
#ifdef GPG_DEBUG
|
||||
std::cerr << "AuthGPGimpl::RevokeCertificate(" << id << ") not implemented yet" << std::endl;
|
||||
std::cerr << "AuthGPGimpl::RevokeCertificate(" << id << ") not implemented yet" << std::endl;
|
||||
#endif
|
||||
|
||||
return false;
|
||||
|
@ -1656,9 +1664,9 @@ 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 ******/
|
||||
//RsStackMutex stack(gpgMtx); /******* LOCKED ******/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -294,9 +294,7 @@ 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;
|
||||
std::map<std::string, peerConnectState>::iterator it;
|
||||
it = mFriendList.find(id);
|
||||
if (it == mFriendList.end())
|
||||
{
|
||||
|
|
|
@ -1167,17 +1167,15 @@ bool p3NetMgrIMPL::setNetworkMode(uint32_t netMode)
|
|||
|
||||
bool p3NetMgrIMPL::setVisState(uint32_t visState)
|
||||
{
|
||||
uint32_t netMode;
|
||||
{
|
||||
RsStackMutex stack(mNetMtx); /****** STACK LOCK MUTEX *******/
|
||||
mVisState = visState;
|
||||
RsStackMutex stack(mNetMtx); /****** STACK LOCK MUTEX *******/
|
||||
mVisState = visState;
|
||||
|
||||
/* if we've started up - then tweak Dht On/Off */
|
||||
if (mNetStatus != RS_NET_UNKNOWN)
|
||||
{
|
||||
enableNetAssistConnect(!(mVisState & RS_VIS_STATE_NODHT));
|
||||
}
|
||||
/* if we've started up - then tweak Dht On/Off */
|
||||
if (mNetStatus != RS_NET_UNKNOWN)
|
||||
{
|
||||
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;
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue