Merge pull request #1477 from PhenomRetroShare/Fix_ClangWarnings

Fix clang warnings
This commit is contained in:
G10h4ck 2019-02-17 11:11:20 -03:00 committed by GitHub
commit 54899f8378
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 51 additions and 51 deletions

View File

@ -29,7 +29,7 @@
#include "util/rstime.h"
class RsPeers;
class RsIdentity;
struct RsIdentity;
namespace resource_api
{

View File

@ -28,7 +28,7 @@
#include "ResourceRouter.h"
#include "StateTokenServer.h"
class RsIdentity;
struct RsIdentity;
namespace resource_api
{

View File

@ -169,8 +169,8 @@ struct RsGxsCommentService
virtual bool getRelatedComments( uint32_t token,
std::vector<RsGxsComment> &comments ) = 0;
virtual bool createComment(uint32_t &token, RsGxsComment &comment) = 0;
virtual bool createVote(uint32_t &token, RsGxsVote &vote) = 0;
virtual bool createNewComment(uint32_t &token, RsGxsComment &comment) = 0;
virtual bool createNewVote(uint32_t &token, RsGxsVote &vote) = 0;
virtual bool acknowledgeComment(
uint32_t token,

View File

@ -87,8 +87,8 @@ virtual bool getPostData(const uint32_t &token, std::vector<RsPostedPost> &posts
/* From RsGxsCommentService */
//virtual bool getCommentData(const uint32_t &token, std::vector<RsGxsComment> &comments) = 0;
//virtual bool getRelatedComments(const uint32_t &token, std::vector<RsGxsComment> &comments) = 0;
//virtual bool createComment(uint32_t &token, RsGxsComment &comment) = 0;
//virtual bool createVote(uint32_t &token, RsGxsVote &vote) = 0;
//virtual bool createNewComment(uint32_t &token, RsGxsComment &comment) = 0;
//virtual bool createNewVote(uint32_t &token, RsGxsVote &vote) = 0;
//////////////////////////////////////////////////////////////////////////////
virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read) = 0;

View File

@ -37,6 +37,8 @@ struct RsSerializable
*/
virtual void serial_process(RsGenericSerializer::SerializeJob j,
RsGenericSerializer::SerializeContext& ctx) = 0;
virtual ~RsSerializable() = default;
};
/** @def RS_SERIAL_PROCESS(I)

View File

@ -1089,7 +1089,7 @@ bool p3GxsChannels::createChannel(RsGxsChannelGroup& channel)
bool p3GxsChannels::createComment(RsGxsComment& comment)
{
uint32_t token;
if(!createComment(token, comment))
if(!createNewComment(token, comment))
{
std::cerr << __PRETTY_FUNCTION__ << "Error! Failed creating comment."
<< std::endl;
@ -1116,7 +1116,7 @@ bool p3GxsChannels::createComment(RsGxsComment& comment)
bool p3GxsChannels::createVote(RsGxsVote& vote)
{
uint32_t token;
if(!createVote(token, vote))
if(!createNewVote(token, vote))
{
std::cerr << __PRETTY_FUNCTION__ << "Error! Failed creating vote."
<< std::endl;
@ -1795,7 +1795,7 @@ bool p3GxsChannels::generateComment(uint32_t &token, const RsGxsGroupId &grpId,
}
#endif
createComment(token, msg);
createNewComment(token, msg);
return true;
}
@ -1846,7 +1846,7 @@ bool p3GxsChannels::generateVote(uint32_t &token, const RsGxsGroupId &grpId, con
vote.mVoteType = GXS_VOTE_DOWN;
}
createVote(token, vote);
createNewVote(token, vote);
return true;
}

View File

@ -132,30 +132,29 @@ virtual bool getChannelDownloadDirectory(const RsGxsGroupId &groupId, std::strin
const RsGxsGroupId& grpId ) override;
/* Comment service - Provide RsGxsCommentService - redirect to p3GxsCommentService */
virtual bool getCommentData(uint32_t token, std::vector<RsGxsComment> &msgs)
virtual bool getCommentData(uint32_t token, std::vector<RsGxsComment> &msgs) override
{ return mCommentService->getGxsCommentData(token, msgs); }
virtual bool getRelatedComments( uint32_t token,
std::vector<RsGxsComment> &msgs )
std::vector<RsGxsComment> &msgs ) override
{ return mCommentService->getGxsRelatedComments(token, msgs); }
virtual bool createComment(uint32_t &token, RsGxsComment &msg)
virtual bool createNewComment(uint32_t &token, RsGxsComment &msg) override
{
return mCommentService->createGxsComment(token, msg);
}
virtual bool createVote(uint32_t &token, RsGxsVote &msg)
virtual bool createNewVote(uint32_t &token, RsGxsVote &msg) override
{
return mCommentService->createGxsVote(token, msg);
}
virtual bool acknowledgeComment(uint32_t token, std::pair<RsGxsGroupId, RsGxsMessageId>& msgId)
virtual bool acknowledgeComment(uint32_t token, std::pair<RsGxsGroupId, RsGxsMessageId>& msgId) override
{
return acknowledgeMsg(token, msgId);
}
virtual bool acknowledgeVote(uint32_t token, std::pair<RsGxsGroupId, RsGxsMessageId>& msgId)
virtual bool acknowledgeVote(uint32_t token, std::pair<RsGxsGroupId, RsGxsMessageId>& msgId) override
{
if (mCommentService->acknowledgeVote(token, msgId))
{

View File

@ -187,8 +187,7 @@ void p3PhotoService::groupsChanged(std::list<RsGxsGroupId>& grpIds)
}
void p3PhotoService::msgsChanged(
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> >& msgs)
void p3PhotoService::msgsChanged(GxsMsgIdResult& msgs)
{
RsStackMutex stack(mPhotoMutex);

View File

@ -56,8 +56,7 @@ public:
void groupsChanged(std::list<RsGxsGroupId>& grpIds);
void msgsChanged(std::map<RsGxsGroupId,
std::vector<RsGxsMessageId> >& msgs);
void msgsChanged(GxsMsgIdResult& msgs);
RsTokenService* getTokenService();

View File

@ -89,12 +89,12 @@ virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgI
std::vector<RsGxsComment> &msgs )
{ return mCommentService->getGxsRelatedComments(token, msgs); }
virtual bool createComment(uint32_t &token, RsGxsComment &msg)
virtual bool createNewComment(uint32_t &token, RsGxsComment &msg)
{
return mCommentService->createGxsComment(token, msg);
}
virtual bool createVote(uint32_t &token, RsGxsVote &msg)
virtual bool createNewVote(uint32_t &token, RsGxsVote &msg)
{
return mCommentService->createGxsVote(token, msg);
}

View File

@ -32,7 +32,7 @@ class RsFeedReaderMsg;
class p3FeedReaderThread;
class RsGxsForums;
class RsGxsForumGroup;
struct RsGxsForumGroup;
class p3FeedReader : public RsPQIService, public RsFeedReader
{

View File

@ -25,7 +25,7 @@
#include "ui_DetailsDialog.h"
#include <retroshare/rstypes.h>
class FileChunksInfo ;
struct FileChunksInfo ;
class DetailsDialog : public QDialog
{

View File

@ -27,8 +27,8 @@
#include "RsAutoUpdatePage.h"
#include <retroshare/rstypes.h>
class FileChunksInfo ;
class FileInfo ;
struct FileChunksInfo ;
struct FileInfo ;
class FileTransferInfoWidget : public RsAutoUpdatePage
{

View File

@ -262,7 +262,7 @@ void PostedListWidget::submitVote(const RsGxsGrpMsgIdPair &msgId, bool up)
std::cerr << "AuthorId : " << vote.mMeta.mAuthorId << std::endl;
uint32_t token;
rsPosted->createVote(token, vote);
rsPosted->createNewVote(token, vote);
mTokenQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, mTokenTypeVote);
}

View File

@ -40,7 +40,7 @@
#define COLUMN_COUNT 6
#define RETROSHARE_DIR_MODEL_FILTER_STRING "filtered"
class DirDetails;
struct DirDetails;
class DirDetailsVector : public DirDetails
{

View File

@ -21,7 +21,7 @@
#ifndef _GROUPDEFS_H
#define _GROUPDEFS_H
class RsGroupInfo;
struct RsGroupInfo;
class GroupDefs
{

View File

@ -24,7 +24,7 @@
#include <QString>
#include <retroshare/rsidentity.h>
class RsPeerDetails;
struct RsPeerDetails;
class PeerDefs
{

View File

@ -24,7 +24,7 @@
#include <QColor>
#include <QFont>
class RsPeerDetails;
struct RsPeerDetails;
class StatusDefs
{

View File

@ -271,7 +271,7 @@ void GxsCommentTreeWidget::vote(const RsGxsGroupId &groupId, const RsGxsMessageI
std::cerr << "AuthorId : " << vote.mMeta.mAuthorId << std::endl;
uint32_t token;
mCommentService->createVote(token, vote);
mCommentService->createNewVote(token, vote);
mTokenQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, COMMENT_VOTE_ACK);
}

View File

@ -105,7 +105,7 @@ void GxsCreateCommentDialog::createComment()
}//switch (ui->idChooser->getChosenId(authorId))
uint32_t token;
mCommentService->createComment(token, comment);
mCommentService->createNewComment(token, comment);
mTokenQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, 0);
close();
}

View File

@ -41,7 +41,7 @@ class GroupTreeWidget;
class GroupItemInfo;
class GxsMessageFrameWidget;
class UIStateHelper;
class RsGxsCommentService;
struct RsGxsCommentService;
class GxsCommentDialog;
class GxsGroupFrameDialog : public RsGxsUpdateBroadcastPage, public TokenResponse

View File

@ -28,7 +28,7 @@
// should update regularly. They also should update only when visible, to save CPU time.
//
class RsGxsIfaceHelper;
struct RsGxsIfaceHelper;
class RsGxsUpdateBroadcastBase;
#define IDCHOOSER_ID_REQUIRED 0x0001

View File

@ -24,7 +24,7 @@
#include "gui/gxs/RsGxsUpdateBroadcastWidget.h"
#include "util/TokenQueue.h"
class RsGxsIfaceHelper;
struct RsGxsIfaceHelper;
class UIStateHelper;
class GxsMessageFrameWidget : public RsGxsUpdateBroadcastWidget, public TokenResponse

View File

@ -25,7 +25,7 @@
#include "gui/common/UserNotify.h"
#include "util/TokenQueue.h"
class RsGxsIfaceHelper;
struct RsGxsIfaceHelper;
class RsGxsUpdateBroadcastBase;
class GxsUserNotify : public UserNotify, public TokenResponse

View File

@ -24,7 +24,7 @@
#include <retroshare/rsgxsifacetypes.h>
class QShowEvent;
class RsGxsIfaceHelper;
struct RsGxsIfaceHelper;
class RsGxsUpdateBroadcast;
typedef uint32_t TurtleRequestId ;

View File

@ -31,7 +31,7 @@
// widget.
//
class RsGxsIfaceHelper;
struct RsGxsIfaceHelper;
class RsGxsUpdateBroadcastBase;
typedef uint32_t TurtleRequestId ;

View File

@ -31,7 +31,7 @@
// widget.
//
class RsGxsIfaceHelper;
struct RsGxsIfaceHelper;
class RsGxsUpdateBroadcastBase;
typedef uint32_t TurtleRequestId;

View File

@ -25,7 +25,7 @@
#include "retroshare/rsgxsifacetypes.h"
class RsGxsChannelPost;
struct RsGxsChannelPost;
class RSTreeWidgetItemCompareRole;
class QTreeWidgetItem;
class GxsFeedItem;

View File

@ -30,13 +30,12 @@
class QSortFilterProxyModel;
class QTreeWidgetItem;
class RSTreeWidgetItemCompareRole;
class RsGxsForumMsg;
class GxsForumsFillThread;
class QItemSelection;
class RsGxsForumGroup;
struct RsGxsForumGroup;
class RsGxsForumModel;
class RsGxsForumMsg;
class ForumModelPostEntry;
struct RsGxsForumMsg;
struct ForumModelPostEntry;
namespace Ui {
class GxsForumThreadWidget;

View File

@ -30,14 +30,14 @@
#include "gui/msgs/MessageInterface.h"
class QAction;
class RsIdentityDetails;
struct RsIdentityDetails;
class QComboBox;
class QFontComboBox;
class QTextEdit;
class QTextCharFormat;
class RSTreeWidgetItemCompareRole;
class RsGxsChannelGroup;
class RsGxsForumGroup;
struct RsGxsChannelGroup;
struct RsGxsForumGroup;
class MessageComposer : public QMainWindow
{

View File

@ -25,8 +25,8 @@
#include <retroshare/rsgxsifacetypes.h>
class RsGxsIfaceHelper;
class RsGxsChanges;
struct RsGxsIfaceHelper;
struct RsGxsChanges;
typedef uint32_t TurtleRequestId ;

View File

@ -434,6 +434,8 @@ no_rs_deprecatedwarning {
no_rs_cppwarning {
QMAKE_CXXFLAGS += -Wno-cpp
QMAKE_CXXFLAGS += -Wno-inconsistent-missing-override
DEFINES *= RS_NO_WARN_CPP
message("QMAKE: You have disabled C preprocessor warnings.")
}