Merge pull request #656 from PhenomRetroShare/Fix_UnitTestWarnings

Fix all warnings in UnitTest
This commit is contained in:
csoler 2017-01-21 17:16:56 +01:00 committed by GitHub
commit 6f7f1c2e65
25 changed files with 95 additions and 93 deletions

View File

@ -40,7 +40,7 @@ bool AuthorPending::expired() const
return time(NULL) > (mTimeStamp + EXPIRY_PERIOD_OFFSET);
}
bool AuthorPending::getAuthorRep(GixsReputation& rep, const RsGxsId& authorId, const RsPeerId& peerId)
bool AuthorPending::getAuthorRep(GixsReputation& rep, const RsGxsId& authorId, const RsPeerId& /*peerId*/)
{
rep.id = authorId ;
rep.reputation_level = mRep->overallReputationLevel(authorId);
@ -96,7 +96,7 @@ bool MsgRespPending::accepted()
GixsReputation rep;
if(getAuthorRep(rep, entry.mAuthorId, mPeerId))
{
if(rep.reputation_level >= mCutOff)
if(rep.reputation_level >= (uint32_t)mCutOff)
{
entry.mPassedVetting = true;
count++;
@ -131,7 +131,7 @@ bool GrpRespPending::accepted()
if(getAuthorRep(rep, entry.mAuthorId, mPeerId))
{
if(rep.reputation_level >= mCutOff)
if(rep.reputation_level >= (uint32_t)mCutOff)
{
entry.mPassedVetting = true;
count++;

View File

@ -91,9 +91,9 @@ public:
virtual ~RsGxsReputationSetItem_deprecated3() {}
virtual void clear() {}
std::ostream &print(std::ostream &out, uint16_t indent = 0) { return out;}
std::ostream &print(std::ostream &out, uint16_t /*indent*/ = 0) { return out;}
virtual bool serialise(void *data,uint32_t& size) const { return false ;}
virtual bool serialise(void */*data*/,uint32_t& /*size*/) const { return false ;}
virtual uint32_t serial_size() const { return 0;}
RsGxsId mGxsId;

View File

@ -18,7 +18,7 @@ class RsSharedPtr
{
public:
RsSharedPtr() : mShared(NULL), mCount(NULL) {}
RsSharedPtr() : mShared(NULL), mCount(NULL), mSharedPtrMutex(NULL){}
RsSharedPtr(T* shared)
: mShared(shared), mCount(new int(0)), mSharedPtrMutex(new RsMutex("SharedMutex"))
@ -96,8 +96,8 @@ private:
private:
int* mCount;
T* mShared;
int* mCount;
RsMutex* mSharedPtrMutex;
};

View File

@ -1389,10 +1389,10 @@ void GxsForumThreadWidget::fillThreads(QList<QTreeWidgetItem *> &threadList, boo
++index;
}
// (csoler) QTreeWidget::findItems apparently does not always work so I need to make the search manually, which I do using a map for efficiency reasons.
std::map<QString,QTreeWidgetItem*> oldThreadMap ;
for(uint32_t i=0;i<ui->threadTreeWidget->topLevelItemCount();++i)
oldThreadMap[ui->threadTreeWidget->topLevelItem(i)->data(COLUMN_THREAD_MSGID,Qt::DisplayRole).toString()] = ui->threadTreeWidget->topLevelItem(i) ;
//(csoler) QTreeWidget::findItems apparently does not always work so I need to make the search manually, which I do using a map for efficiency reasons.
std::map<QString,QTreeWidgetItem*> oldThreadMap;
for(int i=0; i<ui->threadTreeWidget->topLevelItemCount(); ++i)
oldThreadMap[ui->threadTreeWidget->topLevelItem(i)->data(COLUMN_THREAD_MSGID, Qt::DisplayRole).toString()] = ui->threadTreeWidget->topLevelItem(i);
// iterate all new threads
for (QList<QTreeWidgetItem *>::iterator newThread = threadList.begin (); newThread != threadList.end (); ++newThread) {

View File

@ -97,7 +97,7 @@ SetPacket &SetServiceTester::examinePacket(uint32_t idx)
return mPackets[idx];
}
bool SetServiceTester::injectPacket(const SetPacket &pkt)
bool SetServiceTester::injectPacket(const SetPacket &/*pkt*/)
{
std::cerr << "SetServiceTester::injectPacket() Incomplete";
std::cerr << std::endl;

View File

@ -124,7 +124,7 @@ void test_groupStoreAndRetrieve(){
grpMetaR.clear();
EXPECT_TRUE(grpMatch);
EXPECT_TRUE(grpMatch && grpMetaMatch);
tearDown();
}
@ -225,12 +225,12 @@ void test_messageStoresAndRetrieve()
std::vector<RsNxsMsg*>& result0 = msgResult[grpId0];
std::vector<RsNxsMsg*>& result1 = msgResult[grpId1];
std::vector<RsGxsMsgMetaData*>& resultMeta0 = msgMetaResult[grpId0];
std::vector<RsGxsMsgMetaData*>& resultMeta1 = msgMetaResult[grpId1];
//std::vector<RsGxsMsgMetaData*>& resultMeta1 = msgMetaResult[grpId1];
bool msgGrpId0_Match = true, msgGrpId1_Match = true;
bool msgMetaGrpId0_Match = true, msgMetaGrpId1_Match = true;
bool msgMetaGrpId0_Match = true/*, msgMetaGrpId1_Match = true*/;
// MSG test, selective retrieval
for(std::vector<RsNxsMsg*>::size_type i = 0; i < result0.size(); i++)

View File

@ -334,7 +334,8 @@ void GenExchangeTest::init(RsGroupMetaData& grpMetaData) const
randString(SHORT_STR, grpMetaData.mServiceString);
grpMetaData.mGroupFlags = randNum();
grpMetaData.mGroupFlags = randNum() & (0x00000007);//See GXS_SERV::FLAG_PRIVACY_XXX values /libretroshare/src/retroshare/rsgxsflags.h:21
if (grpMetaData.mGroupFlags == 0) grpMetaData.mGroupFlags = GXS_SERV::FLAG_PRIVACY_PRIVATE;
grpMetaData.mLastPost = randNum();
grpMetaData.mGroupStatus = randNum();
grpMetaData.mVisibleMsgCount = randNum();
@ -595,7 +596,7 @@ bool operator ==(const RsDummyMsg& lMsg, const RsDummyMsg& rMsg)
return true;
}
bool operator ==(const RsGxsGrpItem& lGrp, const RsGxsGrpItem& rGrp)
bool operator ==(const RsGxsGrpItem& /*lGrp*/, const RsGxsGrpItem& /*rGrp*/)
{
return false;
}

View File

@ -13,7 +13,7 @@ RsServiceInfo GenExchangeTestService::getServiceInfo()
return info;
}
void GenExchangeTestService::notifyChanges(std::vector<RsGxsNotify *> &changes)
void GenExchangeTestService::notifyChanges(std::vector<RsGxsNotify *> &/*changes*/)
{
return;
}
@ -23,7 +23,7 @@ void GenExchangeTestService::publishDummyGrp(uint32_t &token, RsDummyGrp *grp)
publishGroup(token, grp);
}
void GenExchangeTestService::updateDummyGrp(uint32_t &token, RsGxsGroupUpdateMeta &updateMeta, RsDummyGrp *group)
void GenExchangeTestService::updateDummyGrp(uint32_t &token, RsGxsGroupUpdateMeta &/*updateMeta*/, RsDummyGrp *group)
{
//updateGroup(token, updateMeta, group);
updateGroup(token, group);

View File

@ -15,18 +15,18 @@ public:
RsDummyNetService(){ return;}
virtual ~RsDummyNetService() { }
void setSyncAge(const RsGxsGroupId& id,uint32_t age_in_secs){}
void setKeepAge(const RsGxsGroupId& id,uint32_t age_in_secs){}
void setSyncAge(const RsGxsGroupId& /*id*/,uint32_t /*age_in_secs*/){}
void setKeepAge(const RsGxsGroupId& /*id*/,uint32_t /*age_in_secs*/){}
void requestGroupsOfPeer(const std::string& peerId){}
void requestGroupsOfPeer(const std::string& /*peerId*/){}
void requestMessagesOfPeer(const std::string& peerId, const std::string& grpId){}
void requestMessagesOfPeer(const std::string& /*peerId*/, const std::string& /*grpId*/){}
void pauseSynchronisation(bool enabled) {}
void pauseSynchronisation(bool /*enabled*/) {}
int requestMsg(const std::string& msgId, uint8_t hops){ return 0;}
int requestMsg(const std::string& /*msgId*/, uint8_t /*hops*/){ return 0;}
int requestGrp(const std::list<std::string>& grpId, uint8_t hops) { return 0;}
int requestGrp(const std::list<std::string>& /*grpId*/, uint8_t /*hops*/) { return 0;}
};
@ -44,7 +44,7 @@ public:
std::string msgData;
std::ostream &print(std::ostream &out, uint16_t indent = 0){ return out; }
std::ostream &print(std::ostream &out, uint16_t /*indent*/ = 0){ return out; }
void clear() { msgData.clear(); }
};
@ -59,7 +59,7 @@ public:
std::string grpData;
void clear() { grpData.clear(); }
std::ostream &print(std::ostream &out, uint16_t indent = 0){ return out; }
std::ostream &print(std::ostream &out, uint16_t /*indent*/ = 0){ return out; }
};
@ -108,7 +108,7 @@ public:
* @param
* @param dummyId This is is the only id thats exists in this dummy interface
*/
RsGixsDummy(const RsGxsId& incomingId, const RsGxsId& outgoingId){}
RsGixsDummy(const RsGxsId& /*incomingId*/, const RsGxsId& /*outgoingId*/){}
virtual ~RsGixsDummy(){}
@ -130,14 +130,14 @@ public:
* @param keyref the keyref of key that is being checked for
* @return true if available, false otherwise
*/
bool haveKey(const RsGxsId &id){ return false;}
bool haveKey(const RsGxsId &/*id*/){ return false;}
/*!
* Use to query whether private key member of the given key reference is available
* @param keyref the KeyRef of the key being checked for
* @return true if private key is held here, false otherwise
*/
bool havePrivateKey(const RsGxsId &id){ return false; }
bool havePrivateKey(const RsGxsId &/*id*/){ return false; }
// The fetchKey has an optional peerList.. this is people that had the msg with the signature.
// These same people should have the identity - so we ask them first.
@ -146,8 +146,8 @@ public:
* @param keyref the KeyRef of the key being requested
* @return will
*/
bool requestKey(const RsGxsId &id, const std::list<RsPeerId> &peers){ return false ;}
bool requestPrivateKey(const RsGxsId &id){ return false;}
bool requestKey(const RsGxsId &/*id*/, const std::list<RsPeerId> &/*peers*/){ return false ;}
bool requestPrivateKey(const RsGxsId &/*id*/){ return false;}
/*!
@ -156,8 +156,8 @@ public:
* @return a pointer to a valid profile if successful, otherwise NULL
*
*/
bool getKey(const RsGxsId &id, RsTlvPublicRSAKey& key){ return false; }
bool getPrivateKey(const RsGxsId &id, RsTlvPrivateRSAKey& key){ return false; } // For signing outgoing messages.
bool getKey(const RsGxsId &/*id*/, RsTlvPublicRSAKey& /*key*/){ return false; }
bool getPrivateKey(const RsGxsId &/*id*/, RsTlvPrivateRSAKey& /*key*/){ return false; } // For signing outgoing messages.
private:

View File

@ -14,53 +14,54 @@ rs_nxs_test::RsNxsSimpleDummyCircles::RsNxsSimpleDummyCircles() {
}
bool rs_nxs_test::RsNxsSimpleDummyCircles::isLoaded(
const RsGxsCircleId& circleId) {
const RsGxsCircleId& /*circleId*/) {
return true;
}
bool rs_nxs_test::RsNxsSimpleDummyCircles::loadCircle(
const RsGxsCircleId& circleId) {
const RsGxsCircleId& /*circleId*/) {
return true;
}
int rs_nxs_test::RsNxsSimpleDummyCircles::canSend(const RsGxsCircleId& circleId,
const RsPgpId& id, bool &should_encrypt) {
int rs_nxs_test::RsNxsSimpleDummyCircles::canSend(const RsGxsCircleId& /*circleId*/,
const RsPgpId& /*id*/, bool &/*should_encrypt*/) {
return true;
}
int rs_nxs_test::RsNxsSimpleDummyCircles::canReceive(
const RsGxsCircleId& circleId, const RsPgpId& id) {
const RsGxsCircleId& /*circleId*/, const RsPgpId& /*id*/) {
return true;
}
bool rs_nxs_test::RsNxsSimpleDummyCircles::isRecipient(const RsGxsCircleId &circleId, const RsGxsGroupId &destination_group, const RsGxsId& id)
bool rs_nxs_test::RsNxsSimpleDummyCircles::isRecipient(const RsGxsCircleId &/*circleId*/, const RsGxsGroupId &/*destination_group*/, const RsGxsId& /*id*/)
{
return true ;
}
bool rs_nxs_test::RsNxsSimpleDummyCircles::recipients(
const RsGxsCircleId& circleId, std::list<RsPgpId>& friendlist) {
const RsGxsCircleId& /*circleId*/, std::list<RsPgpId>& /*friendlist*/) {
return true;
}
bool rs_nxs_test::RsNxsSimpleDummyCircles::recipients(const RsGxsCircleId& circleId, const RsGxsGroupId &destination_group, std::list<RsGxsId>& friendlist) {
bool rs_nxs_test::RsNxsSimpleDummyCircles::recipients(const RsGxsCircleId& /*circleId*/, const RsGxsGroupId &/*destination_group*/, std::list<RsGxsId>& /*friendlist*/) {
return true;
}
rs_nxs_test::RsNxsSimpleDummyReputation::RsNxsSimpleDummyReputation(
RepMap& repMap, bool cached) {
RepMap& /*repMap*/, bool /*cached*/) {
}
bool rs_nxs_test::RsNxsSimpleDummyReputation::haveReputation(
const RsGxsId& id) {
const RsGxsId& /*id*/) {
return true;
}
bool rs_nxs_test::RsNxsSimpleDummyReputation::loadReputation(const RsGxsId& id,
const std::list<RsPeerId>& peers) {
bool rs_nxs_test::RsNxsSimpleDummyReputation::loadReputation(const RsGxsId& /*id*/,
const std::list<RsPeerId>& /*peers*/) {
return true;
}
bool rs_nxs_test::RsNxsSimpleDummyReputation::getReputation(const RsGxsId& id,
bool rs_nxs_test::RsNxsSimpleDummyReputation::getReputation(const RsGxsId& /*id*/,
GixsReputation& rep) {
rep.reputation_level = 5;
return true;
@ -84,17 +85,17 @@ bool rs_nxs_test::RsNxsDelayedDummyCircles::loadCircle(
return allowed(circleId);
}
int rs_nxs_test::RsNxsDelayedDummyCircles::canSend(const RsGxsCircleId& circleId, const RsPgpId& id, bool &should_encrypt) {
int rs_nxs_test::RsNxsDelayedDummyCircles::canSend(const RsGxsCircleId& circleId, const RsPgpId& /*id*/, bool &/*should_encrypt*/) {
return allowed(circleId);
}
int rs_nxs_test::RsNxsDelayedDummyCircles::canReceive(
const RsGxsCircleId& circleId, const RsPgpId& id) {
const RsGxsCircleId& circleId, const RsPgpId& /*id*/) {
return allowed(circleId);
}
bool rs_nxs_test::RsNxsDelayedDummyCircles::recipients(
const RsGxsCircleId& circleId, std::list<RsPgpId>& friendlist) {
const RsGxsCircleId& circleId, std::list<RsPgpId>& /*friendlist*/) {
return allowed(circleId);
}

View File

@ -44,7 +44,7 @@ namespace rs_nxs_test
virtual bool recipients(const RsGxsCircleId &circleId, std::list<RsPgpId> &friendlist);
virtual bool recipients(const RsGxsCircleId &circleId, const RsGxsGroupId& destination_group, std::list<RsGxsId>& idlist) ;
virtual bool isRecipient(const RsGxsCircleId &circleId, const RsGxsGroupId& destination_group, const RsGxsId& id) ;
virtual bool getLocalCircleServerUpdateTS(const RsGxsCircleId& gid,time_t& grp_server_update_TS,time_t& msg_server_update_TS) { return true ; }
virtual bool getLocalCircleServerUpdateTS(const RsGxsCircleId& /*gid*/,time_t& /*grp_server_update_TS*/,time_t& /*msg_server_update_TS*/) { return true ; }
};
/*!
@ -71,9 +71,9 @@ namespace rs_nxs_test
int canSend(const RsGxsCircleId &circleId, const RsPgpId &id,bool& should_encrypt);
int canReceive(const RsGxsCircleId &circleId, const RsPgpId &id);
virtual bool recipients(const RsGxsCircleId &circleId, std::list<RsPgpId> &friendlist);
virtual bool recipients(const RsGxsCircleId &circleId, const RsGxsGroupId& destination_group, std::list<RsGxsId>& idlist) { return true ;}
virtual bool isRecipient(const RsGxsCircleId &circleId, const RsGxsGroupId& destination_group, const RsGxsId& id) { return allowed(circleId) ; }
virtual bool getLocalCircleServerUpdateTS(const RsGxsCircleId& gid,time_t& grp_server_update_TS,time_t& msg_server_update_TS) { return true ; }
virtual bool recipients(const RsGxsCircleId &/*circleId*/, const RsGxsGroupId& /*destination_group*/, std::list<RsGxsId>& /*idlist*/) { return true ;}
virtual bool isRecipient(const RsGxsCircleId &circleId, const RsGxsGroupId& /*destination_group*/, const RsGxsId& /*id*/) { return allowed(circleId) ; }
virtual bool getLocalCircleServerUpdateTS(const RsGxsCircleId& /*gid*/,time_t& /*grp_server_update_TS*/,time_t& /*msg_server_update_TS*/) { return true ; }
private:
bool allowed(const RsGxsCircleId& circleId);
@ -130,7 +130,7 @@ namespace rs_nxs_test
}
const RsPeerId& getOwnId() { return mOwnId; }
void getOnlineList(const uint32_t serviceId, std::set<RsPeerId>& ssl_peers)
void getOnlineList(const uint32_t /*serviceId*/, std::set<RsPeerId>& ssl_peers)
{
RsPeerId::std_list::iterator lit = mPeers.begin();

View File

@ -114,12 +114,12 @@ RsNxsNetMgr* NxsGrpSync::getDummyNetManager(const RsPeerId& peerId)
return mNxsNetMgrs[peerId];
}
RsGcxs* NxsGrpSync::getDummyCircles(const RsPeerId& peerId)
RsGcxs* NxsGrpSync::getDummyCircles(const RsPeerId& /*peerId*/)
{
return mCircles;
}
RsGixsReputation* NxsGrpSync::getDummyReputations(const RsPeerId& peerId)
RsGixsReputation* NxsGrpSync::getDummyReputations(const RsPeerId& /*peerId*/)
{
return mRep;
}

View File

@ -129,12 +129,12 @@ RsNxsNetMgr* rs_nxs_test::NxsMsgSync::getDummyNetManager(
return mNxsNetMgrs[peerId];
}
RsGcxs* rs_nxs_test::NxsMsgSync::getDummyCircles(const RsPeerId& peerId) {
RsGcxs* rs_nxs_test::NxsMsgSync::getDummyCircles(const RsPeerId& /*peerId*/) {
return mCircles;
}
RsGixsReputation* rs_nxs_test::NxsMsgSync::getDummyReputations(
const RsPeerId& peerId) {
const RsPeerId& /*peerId*/) {
return mRep;
}

View File

@ -149,7 +149,7 @@ void rs_nxs_test::NxsTestHub::notifyNewMessages(const RsPeerId& pid,
meta->mChildTs = 0;
meta->recvTS = 0;
meta->validated = false;
bool ok = meta->deserialise(msg->meta.bin_data, &(msg->meta.bin_len));
meta->deserialise(msg->meta.bin_data, &(msg->meta.bin_len));
toStore.insert(std::make_pair(msg, meta));
}
@ -168,7 +168,7 @@ void rs_nxs_test::NxsTestHub::notifyNewGroups(const RsPeerId& pid, std::vector<R
{
RsNxsGrp* grp = *it;
RsGxsGrpMetaData* meta = new RsGxsGrpMetaData();
bool ok = meta->deserialise(grp->meta.bin_data, grp->meta.bin_len);
meta->deserialise(grp->meta.bin_data, grp->meta.bin_len);
toStore.insert(std::make_pair(grp, meta));
}

View File

@ -103,9 +103,9 @@ namespace rs_nxs_test
typedef std::map<RsPeerId, RsGxsNetService::pointer > PeerNxsMap ;
RsMutex mMtx;
PeerNxsMap mPeerNxsMap;
NxsTestScenario::pointer mTestScenario;
RsMutex mMtx;
PeerNxsMap mPeerNxsMap;
std::queue<PayLoad> mPayLoad;
};

View File

@ -40,11 +40,11 @@ TEST(libretroshare_gxs, GxsSecurity)
EXPECT_TRUE(GxsSecurity::generateKeyPair(pub_key,priv_key)) ;
#ifdef WIN32
srand(getpid()) ;
#else
#ifdef WIN32
srand(getpid()) ;
#else
srand48(getpid()) ;
#endif
#endif
EXPECT_TRUE( pub_key.keyId == priv_key.keyId );
EXPECT_TRUE( pub_key.startTS == priv_key.startTS );
@ -93,7 +93,7 @@ TEST(libretroshare_gxs, GxsSecurity)
// Check that decrypted data is equal to original data.
//
EXPECT_TRUE((int)data_len == outlen2) ;
EXPECT_TRUE(data_len == outlen2) ;
EXPECT_TRUE(!memcmp(data,out2,outlen2)) ;
}

View File

@ -112,18 +112,18 @@ bool test_StepThroughTlvStack(std::ostream &str, void *data, int size)
{
uint32_t offset = 0;
uint32_t index = 0;
while (offset + 4 <= size)
while (offset + 4 <= (uint32_t)size)
{
uint16_t tlvtype = GetTlvType( &(((uint8_t *) data)[offset]) );
uint16_t tlvsize = GetTlvSize( &(((uint8_t *) data)[offset]) );
uint16_t tlvtype = GetTlvType( &(((uint8_t *) data)[offset]) );
uint16_t tlvsize = GetTlvSize( &(((uint8_t *) data)[offset]) );
str << "Tlv Entry[" << index << "] => Offset: " << offset;
str << " Type: " << tlvtype;
str << " Size: " << tlvsize;
str << std::endl;
offset += tlvsize;
offset += tlvsize ;
}
EXPECT_TRUE(offset == size); /* we match up exactly */
EXPECT_TRUE(offset == (uint32_t)size); /* we match up exactly */
return 1;
}

View File

@ -141,7 +141,7 @@ TEST(libretroshare_serialiser, test_RsTlvBase)
uint16_t data5[6 + 20];
uint32_t pos =0;
uint32_t* offset = &pos;
uint32_t pre_pos = pos;
//uint32_t pre_pos = pos;
SetTlvString((void*)data5, sizeof(data5), offset, TLV_TYPE_STR_NAME, teststring);
uint32_t tlvsize = GetTlvStringSize(teststring);
EXPECT_TRUE(tlvsize == *offset);

View File

@ -108,7 +108,7 @@ bool FakePgpAuxUtils::getGPGAllList(std::list<RsPgpId> &ids)
bool FakePgpAuxUtils::askForDeferredSelfSignature(const void* /*data*/, const uint32_t /*len*/, unsigned char *sign, unsigned int *signlen,int& signature_result, std::string /*reason = ""*/ )
{
for(int i = 0; i < *signlen; i++)
for(unsigned int i = 0; i < *signlen; i++)
{
sign[i] = 0;
}

View File

@ -28,11 +28,11 @@ GxsIsolatedServiceTester::GxsIsolatedServiceTester(const RsPeerId &ownId, const
{
// extract bits we need.
PeerNode *node = getPeerNode();
p3PeerMgr *peerMgr = node->getPeerMgr();
p3LinkMgr *linkMgr = node->getLinkMgr();
p3NetMgr *netMgr = node->getNetMgr();
//p3PeerMgr *peerMgr = node->getPeerMgr();
//p3LinkMgr *linkMgr = node->getLinkMgr();
//p3NetMgr *netMgr = node->getNetMgr();
RsNxsNetMgr *nxsMgr = node->getNxsNetMgr();
p3ServiceControl *serviceCtrl = node->getServiceControl();
//p3ServiceControl *serviceCtrl = node->getServiceControl();
// Create Service for Testing.
// Specific Testing service here.

View File

@ -104,7 +104,7 @@ void GxsPairServiceTester::PrintCapturedPackets()
std::cerr << "#Packets: " << getPacketCount();
std::cerr << std::endl;
for(int i = 0; i < getPacketCount(); i++)
for(uint32_t i = 0; i < getPacketCount(); i++)
{
SetPacket &pkt = examinePacket(i);

View File

@ -33,11 +33,11 @@ GxsPeerNode::GxsPeerNode(const RsPeerId &ownId, const std::list<RsPeerId> &frien
mTestNs(NULL)
{
// extract bits we need.
p3PeerMgr *peerMgr = getPeerMgr();
p3LinkMgr *linkMgr = getLinkMgr();
p3NetMgr *netMgr = getNetMgr();
//p3PeerMgr *peerMgr = getPeerMgr();
//p3LinkMgr *linkMgr = getLinkMgr();
//p3NetMgr *netMgr = getNetMgr();
RsNxsNetMgr *nxsMgr = getNxsNetMgr();
p3ServiceControl *serviceCtrl = getServiceControl();
//p3ServiceControl *serviceCtrl = getServiceControl();
// Create Service for Testing.
// Specific Testing service here.
@ -165,7 +165,7 @@ GxsPeerNode::~GxsPeerNode()
RsDirUtil::cleanupDirectory(mGxsDir, filesToKeep);
}
bool GxsPeerNode::checkTestServiceAllowedGroups(const RsPeerId &peerId)
bool GxsPeerNode::checkTestServiceAllowedGroups(const RsPeerId &/*peerId*/)
{
#ifdef USER_NETSERVICE_WRAPPER
std::vector<RsGxsGroupId> groups;
@ -178,7 +178,7 @@ bool GxsPeerNode::checkTestServiceAllowedGroups(const RsPeerId &peerId)
}
bool GxsPeerNode::checkCircleServiceAllowedGroups(const RsPeerId &peerId)
bool GxsPeerNode::checkCircleServiceAllowedGroups(const RsPeerId &/*peerId*/)
{
#ifdef USER_NETSERVICE_WRAPPER
std::vector<RsGxsGroupId> groups;

View File

@ -54,7 +54,7 @@ RsServiceInfo GxsTestService::getServiceInfo()
}
uint32_t GxsTestService::testAuthenPolicy(uint32_t testMode)
uint32_t GxsTestService::testAuthenPolicy(uint32_t /*testMode*/)
{
uint32_t policy = 0;
uint8_t flag = 0;
@ -304,7 +304,7 @@ std::ostream &operator<<(std::ostream &out, const RsTestMsg &msg)
// Overloaded from RsTickEvent for Event callbacks.
void GxsTestService::handle_event(uint32_t event_type, const std::string &elabel)
void GxsTestService::handle_event(uint32_t event_type, const std::string &/*elabel*/)
{
std::cerr << "GxsTestService::handle_event(" << event_type << ")";
std::cerr << std::endl;

View File

@ -45,7 +45,7 @@ uint32_t RsGxsTestSerialiser::size(RsItem *item)
{
return sizeGxsTestMsgItem(msg_item);
}
return NULL;
return 0;
}
bool RsGxsTestSerialiser::serialise(RsItem *item, void *data, uint32_t *size)

View File

@ -27,9 +27,9 @@ TEST(libretroshare_services, Status_test1)
// extract bits we need.
PeerNode *node = tester.getPeerNode();
p3PeerMgr *peerMgr = node->getPeerMgr();
p3LinkMgr *linkMgr = node->getLinkMgr();
p3NetMgr *netMgr = node->getNetMgr();
//p3PeerMgr *peerMgr = node->getPeerMgr();
//p3LinkMgr *linkMgr = node->getLinkMgr();
//p3NetMgr *netMgr = node->getNetMgr();
p3ServiceControl *serviceCtrl = node->getServiceControl();
// add in service.