mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-29 08:43:29 -05:00
Fix CppCheck in rsnxsitems.h
/libretroshare/src/rsitems/rsnxsitems.h:117: warning: Cppcheck(uninitMemberVar): Member variable 'RsNxsSyncGrpStatsItem::request_type' is not initialized in the constructor. /libretroshare/src/rsitems/rsnxsitems.h:117: warning: Cppcheck(uninitMemberVar): Member variable 'RsNxsSyncGrpStatsItem::number_of_posts' is not initialized in the constructor. /libretroshare/src/rsitems/rsnxsitems.h:117: warning: Cppcheck(uninitMemberVar): Member variable 'RsNxsSyncGrpStatsItem::last_post_TS' is not initialized in the constructor. /libretroshare/src/rsitems/rsnxsitems.h:371: warning: Cppcheck(uninitMemberVar): Member variable 'RsNxsMsg::pos' is not initialized in the constructor. /libretroshare/src/rsitems/rsnxsitems.h:371: warning: Cppcheck(uninitMemberVar): Member variable 'RsNxsMsg::count' is not initialized in the constructor. /libretroshare/src/rsitems/rsnxsitems.h:410: warning: Cppcheck(uninitMemberVar): Member variable 'RsNxsSearchReqItem::nHops' is not initialized in the constructor. /libretroshare/src/rsitems/rsnxsitems.h:410: warning: Cppcheck(uninitMemberVar): Member variable 'RsNxsSearchReqItem::token' is not initialized in the constructor. /libretroshare/src/rsitems/rsnxsitems.h:410: warning: Cppcheck(uninitMemberVar): Member variable 'RsNxsSearchReqItem::expiration' is not initialized in the constructor. /libretroshare/src/rsitems/rsnxsitems.h:431: warning: Cppcheck(uninitMemberVar): Member variable 'RsNxsSearchResultMsgItem::token' is not initialized in the constructor. /libretroshare/src/rsitems/rsnxsitems.h:431: warning: Cppcheck(uninitMemberVar): Member variable 'RsNxsSearchResultMsgItem::expiration' is not initialized in the constructor. /libretroshare/src/rsitems/rsnxsitems.h:99: warning: Cppcheck(noExplicitConstructor): Class 'RsNxsSyncGrpReqItem' has a constructor with 1 argument that is not explicit. /libretroshare/src/rsitems/rsnxsitems.h:117: warning: Cppcheck(noExplicitConstructor): Class 'RsNxsSyncGrpStatsItem' has a constructor with 1 argument that is not explicit. /libretroshare/src/rsitems/rsnxsitems.h:140: warning: Cppcheck(noExplicitConstructor): Class 'RsNxsGroupPublishKeyItem' has a constructor with 1 argument that is not explicit. /libretroshare/src/rsitems/rsnxsitems.h:183: warning: Cppcheck(noExplicitConstructor): Class 'RsNxsTransacItem' has a constructor with 1 argument that is not explicit. /libretroshare/src/rsitems/rsnxsitems.h:211: warning: Cppcheck(noExplicitConstructor): Class 'RsNxsSyncGrpItem' has a constructor with 1 argument that is not explicit. /libretroshare/src/rsitems/rsnxsitems.h:257: warning: Cppcheck(noExplicitConstructor): Class 'RsNxsEncryptedDataItem' has a constructor with 1 argument that is not explicit. /libretroshare/src/rsitems/rsnxsitems.h:283: warning: Cppcheck(noExplicitConstructor): Class 'RsNxsGrp' has a constructor with 1 argument that is not explicit. /libretroshare/src/rsitems/rsnxsitems.h:327: warning: Cppcheck(noExplicitConstructor): Class 'RsNxsSyncMsgReqItem' has a constructor with 1 argument that is not explicit. /libretroshare/src/rsitems/rsnxsitems.h:351: warning: Cppcheck(noExplicitConstructor): Class 'RsNxsSyncMsgItem' has a constructor with 1 argument that is not explicit. /libretroshare/src/rsitems/rsnxsitems.h:371: warning: Cppcheck(noExplicitConstructor): Struct 'RsNxsMsg' has a constructor with 1 argument that is not explicit. /libretroshare/src/rsitems/rsnxsitems.h:410: warning: Cppcheck(noExplicitConstructor): Class 'RsNxsSearchReqItem' has a constructor with 1 argument that is not explicit. /libretroshare/src/rsitems/rsnxsitems.h:500: warning: Cppcheck(noExplicitConstructor): Class 'RsNxsSerialiser' has a constructor with 1 argument that is not explicit. /libretroshare/src/rsitems/rsnxsitems.h:237: warning: Cppcheck(noExplicitConstructor): Class 'RsNxsSessionKeyItem' has a constructor with 1 argument that is not explicit.
This commit is contained in:
parent
c67143d435
commit
7db813defc
@ -96,7 +96,7 @@ public:
|
|||||||
static const uint8_t FLAG_USE_SYNC_HASH;
|
static const uint8_t FLAG_USE_SYNC_HASH;
|
||||||
static const uint8_t FLAG_ONLY_CURRENT; // only send most current version of grps / ignores sync hash
|
static const uint8_t FLAG_ONLY_CURRENT; // only send most current version of grps / ignores sync hash
|
||||||
|
|
||||||
RsNxsSyncGrpReqItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_SYNC_GRP_REQ_ITEM) { clear();}
|
explicit RsNxsSyncGrpReqItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_SYNC_GRP_REQ_ITEM) { clear();}
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
|
|
||||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||||
@ -114,7 +114,10 @@ class RsNxsSyncGrpStatsItem : public RsNxsItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
RsNxsSyncGrpStatsItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_SYNC_GRP_STATS_ITEM) {}
|
explicit RsNxsSyncGrpStatsItem(uint16_t servtype)
|
||||||
|
: RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_SYNC_GRP_STATS_ITEM)
|
||||||
|
, request_type(0), number_of_posts(0), last_post_TS(0)
|
||||||
|
{}
|
||||||
|
|
||||||
virtual void clear() {}
|
virtual void clear() {}
|
||||||
|
|
||||||
@ -137,7 +140,7 @@ public:
|
|||||||
class RsNxsGroupPublishKeyItem : public RsNxsItem
|
class RsNxsGroupPublishKeyItem : public RsNxsItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RsNxsGroupPublishKeyItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_GRP_PUBLISH_KEY_ITEM) { clear(); }
|
explicit RsNxsGroupPublishKeyItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_GRP_PUBLISH_KEY_ITEM) { clear(); }
|
||||||
|
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
|
|
||||||
@ -180,7 +183,7 @@ public:
|
|||||||
static const uint16_t FLAG_TYPE_MSGS;
|
static const uint16_t FLAG_TYPE_MSGS;
|
||||||
static const uint16_t FLAG_TYPE_ENCRYPTED_DATA;
|
static const uint16_t FLAG_TYPE_ENCRYPTED_DATA;
|
||||||
|
|
||||||
RsNxsTransacItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_TRANSAC_ITEM) { clear(); }
|
explicit RsNxsTransacItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_TRANSAC_ITEM) { clear(); }
|
||||||
virtual ~RsNxsTransacItem() {}
|
virtual ~RsNxsTransacItem() {}
|
||||||
|
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
@ -208,7 +211,7 @@ public:
|
|||||||
static const uint8_t FLAG_RESPONSE;
|
static const uint8_t FLAG_RESPONSE;
|
||||||
static const uint8_t FLAG_USE_SYNC_HASH;
|
static const uint8_t FLAG_USE_SYNC_HASH;
|
||||||
|
|
||||||
RsNxsSyncGrpItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_SYNC_GRP_ITEM) { clear();}
|
explicit RsNxsSyncGrpItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_SYNC_GRP_ITEM) { clear();}
|
||||||
virtual ~RsNxsSyncGrpItem() {}
|
virtual ~RsNxsSyncGrpItem() {}
|
||||||
|
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
@ -234,7 +237,7 @@ class RsNxsSessionKeyItem : public RsNxsItem
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
RsNxsSessionKeyItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_SESSION_KEY_ITEM) { clear(); }
|
explicit RsNxsSessionKeyItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_SESSION_KEY_ITEM) { clear(); }
|
||||||
virtual ~RsNxsSessionKeyItem() {}
|
virtual ~RsNxsSessionKeyItem() {}
|
||||||
|
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
@ -254,7 +257,7 @@ class RsNxsEncryptedDataItem : public RsNxsItem
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
RsNxsEncryptedDataItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_ENCRYPTED_DATA_ITEM),encrypted_data(servtype)
|
explicit RsNxsEncryptedDataItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_ENCRYPTED_DATA_ITEM),encrypted_data(servtype)
|
||||||
{
|
{
|
||||||
encrypted_data.tlvtype = TLV_TYPE_BIN_ENCRYPTED ;
|
encrypted_data.tlvtype = TLV_TYPE_BIN_ENCRYPTED ;
|
||||||
clear();
|
clear();
|
||||||
@ -280,9 +283,10 @@ class RsNxsGrp : public RsNxsItem
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
RsNxsGrp(uint16_t servtype) :
|
explicit RsNxsGrp(uint16_t servtype)
|
||||||
RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_GRP_ITEM), grp(servtype),
|
: RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_GRP_ITEM), grp(servtype)
|
||||||
meta(servtype), metaData(NULL) { clear(); }
|
, meta(servtype), metaData(NULL)
|
||||||
|
{ clear(); }
|
||||||
virtual ~RsNxsGrp() { delete metaData; }
|
virtual ~RsNxsGrp() { delete metaData; }
|
||||||
|
|
||||||
RsNxsGrp* clone() const;
|
RsNxsGrp* clone() const;
|
||||||
@ -324,7 +328,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
static const uint8_t FLAG_USE_HASHED_GROUP_ID;
|
static const uint8_t FLAG_USE_HASHED_GROUP_ID;
|
||||||
|
|
||||||
RsNxsSyncMsgReqItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_SYNC_MSG_REQ_ITEM) { clear(); }
|
explicit RsNxsSyncMsgReqItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_SYNC_MSG_REQ_ITEM) { clear(); }
|
||||||
|
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
|
|
||||||
@ -348,7 +352,7 @@ public:
|
|||||||
static const uint8_t FLAG_REQUEST;
|
static const uint8_t FLAG_REQUEST;
|
||||||
static const uint8_t FLAG_RESPONSE;
|
static const uint8_t FLAG_RESPONSE;
|
||||||
static const uint8_t FLAG_USE_SYNC_HASH;
|
static const uint8_t FLAG_USE_SYNC_HASH;
|
||||||
RsNxsSyncMsgItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_SYNC_MSG_ITEM) { clear(); }
|
explicit RsNxsSyncMsgItem(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_SYNC_MSG_ITEM) { clear(); }
|
||||||
|
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
|
|
||||||
@ -368,9 +372,10 @@ public:
|
|||||||
*/
|
*/
|
||||||
struct RsNxsMsg : RsNxsItem
|
struct RsNxsMsg : RsNxsItem
|
||||||
{
|
{
|
||||||
RsNxsMsg(uint16_t servtype) :
|
explicit RsNxsMsg(uint16_t servtype)
|
||||||
RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_MSG_ITEM), meta(servtype),
|
: RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_MSG_ITEM)
|
||||||
msg(servtype), metaData(NULL) { clear(); }
|
, pos(0), count(0), meta(servtype), msg(servtype), metaData(NULL)
|
||||||
|
{ clear(); }
|
||||||
virtual ~RsNxsMsg() { delete metaData; }
|
virtual ~RsNxsMsg() { delete metaData; }
|
||||||
|
|
||||||
virtual void serial_process( RsGenericSerializer::SerializeJob j,
|
virtual void serial_process( RsGenericSerializer::SerializeJob j,
|
||||||
@ -407,7 +412,10 @@ class RsNxsSearchReqItem : public RsNxsItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
RsNxsSearchReqItem(uint16_t servtype): RsNxsItem(servtype, RS_PKT_SUBTYPE_EXT_SEARCH_REQ), serviceSearchItem(servtype) {}
|
explicit RsNxsSearchReqItem(uint16_t servtype)
|
||||||
|
: RsNxsItem(servtype, RS_PKT_SUBTYPE_EXT_SEARCH_REQ)
|
||||||
|
, nHops(0), token(0), serviceSearchItem(servtype), expiration(0)
|
||||||
|
{}
|
||||||
virtual ~RsNxsSearchReqItem() {}
|
virtual ~RsNxsSearchReqItem() {}
|
||||||
virtual void clear() {}
|
virtual void clear() {}
|
||||||
|
|
||||||
@ -428,7 +436,9 @@ class RsNxsSearchResultMsgItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
RsNxsSearchResultMsgItem() : context(0) {}
|
RsNxsSearchResultMsgItem()
|
||||||
|
: token(0), context(0), expiration(0)
|
||||||
|
{}
|
||||||
|
|
||||||
void clear() {}
|
void clear() {}
|
||||||
|
|
||||||
@ -497,7 +507,7 @@ class RsNxsSerialiser : public RsServiceSerializer
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
RsNxsSerialiser(uint16_t servtype) : RsServiceSerializer(servtype), SERVICE_TYPE(servtype) {}
|
explicit RsNxsSerialiser(uint16_t servtype) : RsServiceSerializer(servtype), SERVICE_TYPE(servtype) {}
|
||||||
virtual ~RsNxsSerialiser() {}
|
virtual ~RsNxsSerialiser() {}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user