diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index 7e1331396..532671fce 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -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; diff --git a/libretroshare/src/services/p3gxsreputation.cc b/libretroshare/src/services/p3gxsreputation.cc index ea0c7f519..0ae507e60 100644 --- a/libretroshare/src/services/p3gxsreputation.cc +++ b/libretroshare/src/services/p3gxsreputation.cc @@ -1347,13 +1347,13 @@ void Reputation::updateReputation() for(std::map::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! diff --git a/retroshare-gui/src/gui/gxs/GxsIdDetails.cpp b/retroshare-gui/src/gui/gxs/GxsIdDetails.cpp index 0ccc4c2a2..65e51fc45 100644 --- a/retroshare-gui/src/gui/gxs/GxsIdDetails.cpp +++ b/retroshare-gui/src/gui/gxs/GxsIdDetails.cpp @@ -996,18 +996,17 @@ 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) { - case RsReputations::REPUTATION_LOCALLY_NEGATIVE: return QIcon(REPUTATION_LOCALLY_NEGATIVE_ICON) ; break ; - case RsReputations::REPUTATION_LOCALLY_POSITIVE: return QIcon(REPUTATION_LOCALLY_POSITIVE_ICON) ; break ; - case RsReputations::REPUTATION_REMOTELY_POSITIVE: return QIcon(REPUTATION_REMOTELY_POSITIVE_ICON) ; break ; - case RsReputations::REPUTATION_REMOTELY_NEGATIVE: return QIcon(REPUTATION_REMOTELY_NEGATIVE_ICON) ; break ; - case RsReputations::REPUTATION_NEUTRAL: return QIcon(REPUTATION_NEUTRAL_ICON) ; break ; - default: - std::cerr << "Asked for unidentified icon index " << icon_index << std::endl; + case RsReputations::REPUTATION_LOCALLY_NEGATIVE: return QIcon(REPUTATION_LOCALLY_NEGATIVE_ICON) ; break ; + case RsReputations::REPUTATION_LOCALLY_POSITIVE: return QIcon(REPUTATION_LOCALLY_POSITIVE_ICON) ; break ; + case RsReputations::REPUTATION_REMOTELY_POSITIVE: return QIcon(REPUTATION_REMOTELY_POSITIVE_ICON) ; break ; + case RsReputations::REPUTATION_REMOTELY_NEGATIVE: return QIcon(REPUTATION_REMOTELY_NEGATIVE_ICON) ; break ; + case RsReputations::REPUTATION_NEUTRAL: return QIcon(REPUTATION_NEUTRAL_ICON) ; break ; + default: + std::cerr << "Asked for unidentified icon index " << icon_index << std::endl; return QIcon(); // dont draw anything } } diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index 428dda5e0..8e5eefa8f 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -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)) - { - reputation_level = iddetails.mReputation.mOverallReputationLevel ; - redacted = (reputation_level == RsReputations::REPUTATION_LOCALLY_NEGATIVE) ; - } - else - reputation_level = RsReputations::REPUTATION_UNKNOWN ; + if( rsIdentity->getIdDetails(msg.mMeta.mAuthorId,iddetails) ) + { + reputation_level = iddetails.mReputation.mOverallReputationLevel; + redacted = (reputation_level == RsReputations::REPUTATION_LOCALLY_NEGATIVE); + } + else + reputation_level = RsReputations::REPUTATION_UNKNOWN; GxsIdRSTreeWidgetItem *item = new GxsIdRSTreeWidgetItem(mThreadCompareRole,GxsIdDetails::ICON_TYPE_AVATAR ); item->moveToThread(ui->threadTreeWidget->thread());