diff --git a/libretroshare/src/gxs/rsgxsnetutils.cc b/libretroshare/src/gxs/rsgxsnetutils.cc index 1956f8964..4d54ce117 100644 --- a/libretroshare/src/gxs/rsgxsnetutils.cc +++ b/libretroshare/src/gxs/rsgxsnetutils.cc @@ -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++; diff --git a/libretroshare/src/serialiser/rsgxsreputationitems.h b/libretroshare/src/serialiser/rsgxsreputationitems.h index c7321f74b..0fdc40ee2 100644 --- a/libretroshare/src/serialiser/rsgxsreputationitems.h +++ b/libretroshare/src/serialiser/rsgxsreputationitems.h @@ -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; diff --git a/libretroshare/src/util/rssharedptr.h b/libretroshare/src/util/rssharedptr.h index 495c99e28..70213952e 100644 --- a/libretroshare/src/util/rssharedptr.h +++ b/libretroshare/src/util/rssharedptr.h @@ -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; }; diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index c20598294..dff2f5546 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -1389,10 +1389,10 @@ void GxsForumThreadWidget::fillThreads(QList &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 oldThreadMap ; - for(uint32_t i=0;ithreadTreeWidget->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 oldThreadMap; + for(int i=0; ithreadTreeWidget->topLevelItemCount(); ++i) + oldThreadMap[ui->threadTreeWidget->topLevelItem(i)->data(COLUMN_THREAD_MSGID, Qt::DisplayRole).toString()] = ui->threadTreeWidget->topLevelItem(i); // iterate all new threads for (QList::iterator newThread = threadList.begin (); newThread != threadList.end (); ++newThread) { diff --git a/tests/librssimulator/testing/SetServiceTester.cc b/tests/librssimulator/testing/SetServiceTester.cc index 574399a76..3983b3a5b 100644 --- a/tests/librssimulator/testing/SetServiceTester.cc +++ b/tests/librssimulator/testing/SetServiceTester.cc @@ -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; diff --git a/tests/unittests/libretroshare/gxs/data_service/rsdataservice_test.cc b/tests/unittests/libretroshare/gxs/data_service/rsdataservice_test.cc index 96404dfab..6cf0abeef 100644 --- a/tests/unittests/libretroshare/gxs/data_service/rsdataservice_test.cc +++ b/tests/unittests/libretroshare/gxs/data_service/rsdataservice_test.cc @@ -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& result0 = msgResult[grpId0]; std::vector& result1 = msgResult[grpId1]; std::vector& resultMeta0 = msgMetaResult[grpId0]; - std::vector& resultMeta1 = msgMetaResult[grpId1]; + //std::vector& 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::size_type i = 0; i < result0.size(); i++) diff --git a/tests/unittests/libretroshare/gxs/gen_exchange/genexchangetester.cc b/tests/unittests/libretroshare/gxs/gen_exchange/genexchangetester.cc index cf79d3761..6fd3bfda2 100644 --- a/tests/unittests/libretroshare/gxs/gen_exchange/genexchangetester.cc +++ b/tests/unittests/libretroshare/gxs/gen_exchange/genexchangetester.cc @@ -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; } diff --git a/tests/unittests/libretroshare/gxs/gen_exchange/genexchangetestservice.cc b/tests/unittests/libretroshare/gxs/gen_exchange/genexchangetestservice.cc index daccb7bde..d6c8134a9 100644 --- a/tests/unittests/libretroshare/gxs/gen_exchange/genexchangetestservice.cc +++ b/tests/unittests/libretroshare/gxs/gen_exchange/genexchangetestservice.cc @@ -13,7 +13,7 @@ RsServiceInfo GenExchangeTestService::getServiceInfo() return info; } -void GenExchangeTestService::notifyChanges(std::vector &changes) +void GenExchangeTestService::notifyChanges(std::vector &/*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); diff --git a/tests/unittests/libretroshare/gxs/gen_exchange/rsdummyservices.h b/tests/unittests/libretroshare/gxs/gen_exchange/rsdummyservices.h index 3bb951410..0bb040aba 100644 --- a/tests/unittests/libretroshare/gxs/gen_exchange/rsdummyservices.h +++ b/tests/unittests/libretroshare/gxs/gen_exchange/rsdummyservices.h @@ -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& grpId, uint8_t hops) { return 0;} + int requestGrp(const std::list& /*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 &peers){ return false ;} - bool requestPrivateKey(const RsGxsId &id){ return false;} + bool requestKey(const RsGxsId &/*id*/, const std::list &/*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: diff --git a/tests/unittests/libretroshare/gxs/nxs_test/nxsdummyservices.cc b/tests/unittests/libretroshare/gxs/nxs_test/nxsdummyservices.cc index 216188145..d92e48936 100644 --- a/tests/unittests/libretroshare/gxs/nxs_test/nxsdummyservices.cc +++ b/tests/unittests/libretroshare/gxs/nxs_test/nxsdummyservices.cc @@ -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& friendlist) { + const RsGxsCircleId& /*circleId*/, std::list& /*friendlist*/) { return true; } -bool rs_nxs_test::RsNxsSimpleDummyCircles::recipients(const RsGxsCircleId& circleId, const RsGxsGroupId &destination_group, std::list& friendlist) { +bool rs_nxs_test::RsNxsSimpleDummyCircles::recipients(const RsGxsCircleId& /*circleId*/, const RsGxsGroupId &/*destination_group*/, std::list& /*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& peers) { +bool rs_nxs_test::RsNxsSimpleDummyReputation::loadReputation(const RsGxsId& /*id*/, + const std::list& /*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& friendlist) { + const RsGxsCircleId& circleId, std::list& /*friendlist*/) { return allowed(circleId); } diff --git a/tests/unittests/libretroshare/gxs/nxs_test/nxsdummyservices.h b/tests/unittests/libretroshare/gxs/nxs_test/nxsdummyservices.h index 2a7f3aeff..9f42c4bbc 100644 --- a/tests/unittests/libretroshare/gxs/nxs_test/nxsdummyservices.h +++ b/tests/unittests/libretroshare/gxs/nxs_test/nxsdummyservices.h @@ -44,7 +44,7 @@ namespace rs_nxs_test virtual bool recipients(const RsGxsCircleId &circleId, std::list &friendlist); virtual bool recipients(const RsGxsCircleId &circleId, const RsGxsGroupId& destination_group, std::list& 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 &friendlist); - virtual bool recipients(const RsGxsCircleId &circleId, const RsGxsGroupId& destination_group, std::list& 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& /*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& ssl_peers) + void getOnlineList(const uint32_t /*serviceId*/, std::set& ssl_peers) { RsPeerId::std_list::iterator lit = mPeers.begin(); diff --git a/tests/unittests/libretroshare/gxs/nxs_test/nxsgrpsync_test.cc b/tests/unittests/libretroshare/gxs/nxs_test/nxsgrpsync_test.cc index b7806d466..769eb4495 100644 --- a/tests/unittests/libretroshare/gxs/nxs_test/nxsgrpsync_test.cc +++ b/tests/unittests/libretroshare/gxs/nxs_test/nxsgrpsync_test.cc @@ -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; } diff --git a/tests/unittests/libretroshare/gxs/nxs_test/nxsmsgsync_test.cc b/tests/unittests/libretroshare/gxs/nxs_test/nxsmsgsync_test.cc index 0d036c038..f0b0e4dec 100644 --- a/tests/unittests/libretroshare/gxs/nxs_test/nxsmsgsync_test.cc +++ b/tests/unittests/libretroshare/gxs/nxs_test/nxsmsgsync_test.cc @@ -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; } diff --git a/tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.cc b/tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.cc index 1e46f17d6..216f971c1 100644 --- a/tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.cc +++ b/tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.cc @@ -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::vectordeserialise(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)); } diff --git a/tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.h b/tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.h index f5eeac5f0..a37ff78e3 100644 --- a/tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.h +++ b/tests/unittests/libretroshare/gxs/nxs_test/nxstesthub.h @@ -103,9 +103,9 @@ namespace rs_nxs_test typedef std::map PeerNxsMap ; - RsMutex mMtx; - PeerNxsMap mPeerNxsMap; NxsTestScenario::pointer mTestScenario; + RsMutex mMtx; + PeerNxsMap mPeerNxsMap; std::queue mPayLoad; }; diff --git a/tests/unittests/libretroshare/gxs/security/gxssecurity_test.cc b/tests/unittests/libretroshare/gxs/security/gxssecurity_test.cc index 416979ec0..ac293f566 100644 --- a/tests/unittests/libretroshare/gxs/security/gxssecurity_test.cc +++ b/tests/unittests/libretroshare/gxs/security/gxssecurity_test.cc @@ -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)) ; } diff --git a/tests/unittests/libretroshare/serialiser/rstlvutil.cc b/tests/unittests/libretroshare/serialiser/rstlvutil.cc index 6613ed9b3..4ca2ab0e4 100644 --- a/tests/unittests/libretroshare/serialiser/rstlvutil.cc +++ b/tests/unittests/libretroshare/serialiser/rstlvutil.cc @@ -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; } diff --git a/tests/unittests/libretroshare/serialiser/tlvbase_test.cc b/tests/unittests/libretroshare/serialiser/tlvbase_test.cc index 0dd6e839a..a99038493 100644 --- a/tests/unittests/libretroshare/serialiser/tlvbase_test.cc +++ b/tests/unittests/libretroshare/serialiser/tlvbase_test.cc @@ -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); diff --git a/tests/unittests/libretroshare/services/gxs/FakePgpAuxUtils.cc b/tests/unittests/libretroshare/services/gxs/FakePgpAuxUtils.cc index 2b31d53d1..f4dfc85dc 100644 --- a/tests/unittests/libretroshare/services/gxs/FakePgpAuxUtils.cc +++ b/tests/unittests/libretroshare/services/gxs/FakePgpAuxUtils.cc @@ -108,7 +108,7 @@ bool FakePgpAuxUtils::getGPGAllList(std::list &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; } diff --git a/tests/unittests/libretroshare/services/gxs/GxsIsolatedServiceTester.cc b/tests/unittests/libretroshare/services/gxs/GxsIsolatedServiceTester.cc index 38e47e862..46d4cfdee 100644 --- a/tests/unittests/libretroshare/services/gxs/GxsIsolatedServiceTester.cc +++ b/tests/unittests/libretroshare/services/gxs/GxsIsolatedServiceTester.cc @@ -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. diff --git a/tests/unittests/libretroshare/services/gxs/GxsPairServiceTester.cc b/tests/unittests/libretroshare/services/gxs/GxsPairServiceTester.cc index 3df343b9b..b56f2c868 100644 --- a/tests/unittests/libretroshare/services/gxs/GxsPairServiceTester.cc +++ b/tests/unittests/libretroshare/services/gxs/GxsPairServiceTester.cc @@ -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); diff --git a/tests/unittests/libretroshare/services/gxs/GxsPeerNode.cc b/tests/unittests/libretroshare/services/gxs/GxsPeerNode.cc index 18156a693..83089fa0c 100644 --- a/tests/unittests/libretroshare/services/gxs/GxsPeerNode.cc +++ b/tests/unittests/libretroshare/services/gxs/GxsPeerNode.cc @@ -33,11 +33,11 @@ GxsPeerNode::GxsPeerNode(const RsPeerId &ownId, const std::list &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 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 groups; diff --git a/tests/unittests/libretroshare/services/gxs/gxstestservice.cc b/tests/unittests/libretroshare/services/gxs/gxstestservice.cc index 1a033bf4c..882bd9cc8 100644 --- a/tests/unittests/libretroshare/services/gxs/gxstestservice.cc +++ b/tests/unittests/libretroshare/services/gxs/gxstestservice.cc @@ -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; diff --git a/tests/unittests/libretroshare/services/gxs/rsgxstestitems.cc b/tests/unittests/libretroshare/services/gxs/rsgxstestitems.cc index 97a4cd5e3..46025ca7a 100644 --- a/tests/unittests/libretroshare/services/gxs/rsgxstestitems.cc +++ b/tests/unittests/libretroshare/services/gxs/rsgxstestitems.cc @@ -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) diff --git a/tests/unittests/libretroshare/services/status/status_test.cc b/tests/unittests/libretroshare/services/status/status_test.cc index 1f8723728..59945ad95 100644 --- a/tests/unittests/libretroshare/services/status/status_test.cc +++ b/tests/unittests/libretroshare/services/status/status_test.cc @@ -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.