Fix some new warnings

This commit is contained in:
Phenom 2016-12-31 15:17:51 +01:00
parent 85e6f61f02
commit 41386c64b7
4 changed files with 22 additions and 23 deletions

View File

@ -758,7 +758,7 @@ int RsGenExchange::createMessage(RsNxsMsg* msg)
}
}
int RsGenExchange::validateMsg(RsNxsMsg *msg, const uint32_t& grpFlag, const uint32_t& signFlag, RsTlvSecurityKeySet& grpKeySet)
int RsGenExchange::validateMsg(RsNxsMsg *msg, const uint32_t& grpFlag, const uint32_t& /*signFlag*/, RsTlvSecurityKeySet& grpKeySet)
{
bool needIdentitySign = false;
bool needPublishSign = false;

View File

@ -1347,13 +1347,13 @@ void Reputation::updateReputation()
for(std::map<RsPeerId,RsReputations::Opinion>::const_iterator it(mOpinions.begin());it!=mOpinions.end();++it)
{
if(it->second == RsReputations::OPINION_NEGATIVE)
if( it->second == RsReputations::OPINION_NEGATIVE)
++mFriendsNegative ;
if(it->second == RsReputations::OPINION_POSITIVE)
if( it->second == RsReputations::OPINION_POSITIVE)
++mFriendsPositive ;
friend_total += it->second - 1;
friend_total += it->second - 1 ;
}
if(mOpinions.empty()) // includes the case of no friends!

View File

@ -996,8 +996,7 @@ QString nickname ;
QIcon GxsIdDetails::getReputationIcon(RsReputations::ReputationLevel icon_index,uint32_t min_reputation)
{
if(icon_index >= min_reputation)
return QIcon(REPUTATION_VOID);
if( icon_index >= min_reputation ) return QIcon(REPUTATION_VOID) ;
switch(icon_index)
{

View File

@ -1072,18 +1072,18 @@ QTreeWidgetItem *GxsForumThreadWidget::convertMsgToThreadWidget(const RsGxsForum
// Early check for a message that should be hidden because its author
// is flagged with a bad reputation
RsIdentityDetails iddetails ;
RsIdentityDetails iddetails;
RsReputations::ReputationLevel reputation_level = RsReputations::REPUTATION_NEUTRAL ;
bool redacted = false ;
RsReputations::ReputationLevel reputation_level = RsReputations::REPUTATION_NEUTRAL;
bool redacted = false;
if(rsIdentity->getIdDetails(msg.mMeta.mAuthorId,iddetails))
if( rsIdentity->getIdDetails(msg.mMeta.mAuthorId,iddetails) )
{
reputation_level = iddetails.mReputation.mOverallReputationLevel ;
redacted = (reputation_level == RsReputations::REPUTATION_LOCALLY_NEGATIVE) ;
reputation_level = iddetails.mReputation.mOverallReputationLevel;
redacted = (reputation_level == RsReputations::REPUTATION_LOCALLY_NEGATIVE);
}
else
reputation_level = RsReputations::REPUTATION_UNKNOWN ;
reputation_level = RsReputations::REPUTATION_UNKNOWN;
GxsIdRSTreeWidgetItem *item = new GxsIdRSTreeWidgetItem(mThreadCompareRole,GxsIdDetails::ICON_TYPE_AVATAR );
item->moveToThread(ui->threadTreeWidget->thread());