Fix all warnings in UnitTest

This commit is contained in:
Phenom 2017-01-21 16:31:22 +01:00
parent e3240de8e0
commit aa05d60894
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;
};