mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix CppCheck in grouteritems.h
/libretroshare/src/grouter/grouteritems.h:93: warning: Cppcheck(uninitMemberVar): Member variable 'RsGRouterAbstractMsgItem::flags' is not initialized in the constructor. /libretroshare/src/grouter/grouteritems.h:106: warning: Cppcheck(uninitMemberVar): Member variable 'RsGRouterGenericDataItem::data_size' is not initialized in the constructor. /libretroshare/src/grouter/grouteritems.h:106: warning: Cppcheck(uninitMemberVar): Member variable 'RsGRouterGenericDataItem::data_bytes' is not initialized in the constructor. /libretroshare/src/grouter/grouteritems.h:106: warning: Cppcheck(uninitMemberVar): Member variable 'RsGRouterGenericDataItem::duplication_factor' is not initialized in the constructor. /libretroshare/src/grouter/grouteritems.h:159: warning: Cppcheck(uninitMemberVar): Member variable 'RsGRouterTransactionChunkItem::chunk_start' is not initialized in the constructor. /libretroshare/src/grouter/grouteritems.h:159: warning: Cppcheck(uninitMemberVar): Member variable 'RsGRouterTransactionChunkItem::chunk_size' is not initialized in the constructor. /libretroshare/src/grouter/grouteritems.h:159: warning: Cppcheck(uninitMemberVar): Member variable 'RsGRouterTransactionChunkItem::total_size' is not initialized in the constructor. /libretroshare/src/grouter/grouteritems.h:159: warning: Cppcheck(uninitMemberVar): Member variable 'RsGRouterTransactionChunkItem::chunk_data' is not initialized in the constructor. /libretroshare/src/grouter/grouteritems.h:220: warning: Cppcheck(uninitMemberVar): Member variable 'RsGRouterMatrixTrackItem::time_stamp' is not initialized in the constructor. /libretroshare/src/grouter/grouteritems.h:62: warning: Cppcheck(noExplicitConstructor): Class 'RsGRouterItem' has a constructor with 1 argument that is not explicit. /libretroshare/src/grouter/grouteritems.h:93: warning: Cppcheck(noExplicitConstructor): Class 'RsGRouterAbstractMsgItem' has a constructor with 1 argument that is not explicit. /libretroshare/src/grouter/grouteritems.h:147: warning: Cppcheck(noExplicitConstructor): Class 'RsGRouterTransactionItem' has a constructor with 1 argument that is not explicit. /libretroshare/src/grouter/grouteritems.h:274: warning: Cppcheck(noExplicitConstructor): Class 'RsGRouterSerialiser' has a constructor with 1 argument that is not explicit.
This commit is contained in:
parent
10233ef1cc
commit
10721945a3
@ -59,7 +59,7 @@ const uint8_t QOS_PRIORITY_RS_GROUTER = 4 ; // relevant for items that travel
|
||||
class RsGRouterItem: public RsItem
|
||||
{
|
||||
public:
|
||||
RsGRouterItem(uint8_t grouter_subtype) : RsItem(RS_PKT_VERSION_SERVICE,RS_SERVICE_TYPE_GROUTER,grouter_subtype) {}
|
||||
explicit RsGRouterItem(uint8_t grouter_subtype) : RsItem(RS_PKT_VERSION_SERVICE,RS_SERVICE_TYPE_GROUTER,grouter_subtype) {}
|
||||
|
||||
virtual ~RsGRouterItem() {}
|
||||
|
||||
@ -90,7 +90,7 @@ class RsGRouterNonCopyableObject
|
||||
class RsGRouterAbstractMsgItem: public RsGRouterItem
|
||||
{
|
||||
public:
|
||||
RsGRouterAbstractMsgItem(uint8_t pkt_subtype) : RsGRouterItem(pkt_subtype) {}
|
||||
explicit RsGRouterAbstractMsgItem(uint8_t pkt_subtype) : RsGRouterItem(pkt_subtype), flags(0) {}
|
||||
virtual ~RsGRouterAbstractMsgItem() {}
|
||||
|
||||
GRouterMsgPropagationId routing_id ;
|
||||
@ -103,7 +103,7 @@ public:
|
||||
class RsGRouterGenericDataItem: public RsGRouterAbstractMsgItem, public RsGRouterNonCopyableObject
|
||||
{
|
||||
public:
|
||||
RsGRouterGenericDataItem() : RsGRouterAbstractMsgItem(RS_PKT_SUBTYPE_GROUTER_DATA) { setPriorityLevel(QOS_PRIORITY_RS_GROUTER) ; }
|
||||
RsGRouterGenericDataItem() : RsGRouterAbstractMsgItem(RS_PKT_SUBTYPE_GROUTER_DATA), data_size(0), data_bytes(NULL), duplication_factor(0) { setPriorityLevel(QOS_PRIORITY_RS_GROUTER) ; }
|
||||
virtual ~RsGRouterGenericDataItem() { clear() ; }
|
||||
|
||||
virtual void clear()
|
||||
@ -144,7 +144,7 @@ class RsGRouterSignedReceiptItem: public RsGRouterAbstractMsgItem
|
||||
class RsGRouterTransactionItem: public RsGRouterItem
|
||||
{
|
||||
public:
|
||||
RsGRouterTransactionItem(uint8_t pkt_subtype) : RsGRouterItem(pkt_subtype) {}
|
||||
explicit RsGRouterTransactionItem(uint8_t pkt_subtype) : RsGRouterItem(pkt_subtype) {}
|
||||
|
||||
virtual ~RsGRouterTransactionItem() {}
|
||||
|
||||
@ -156,7 +156,7 @@ class RsGRouterTransactionItem: public RsGRouterItem
|
||||
class RsGRouterTransactionChunkItem: public RsGRouterTransactionItem, public RsGRouterNonCopyableObject
|
||||
{
|
||||
public:
|
||||
RsGRouterTransactionChunkItem() : RsGRouterTransactionItem(RS_PKT_SUBTYPE_GROUTER_TRANSACTION_CHUNK) { setPriorityLevel(QOS_PRIORITY_RS_GROUTER) ; }
|
||||
RsGRouterTransactionChunkItem() : RsGRouterTransactionItem(RS_PKT_SUBTYPE_GROUTER_TRANSACTION_CHUNK), chunk_start(0), chunk_size(0), total_size(0), chunk_data(NULL) { setPriorityLevel(QOS_PRIORITY_RS_GROUTER) ; }
|
||||
|
||||
virtual ~RsGRouterTransactionChunkItem() { free(chunk_data) ; }
|
||||
|
||||
@ -217,7 +217,7 @@ class RsGRouterMatrixCluesItem: public RsGRouterItem
|
||||
class RsGRouterMatrixTrackItem: public RsGRouterItem
|
||||
{
|
||||
public:
|
||||
RsGRouterMatrixTrackItem() : RsGRouterItem(RS_PKT_SUBTYPE_GROUTER_MATRIX_TRACK)
|
||||
RsGRouterMatrixTrackItem() : RsGRouterItem(RS_PKT_SUBTYPE_GROUTER_MATRIX_TRACK), time_stamp(0)
|
||||
{ setPriorityLevel(0) ; } // this item is never sent through the network
|
||||
|
||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
@ -271,7 +271,7 @@ class RsGRouterRoutingInfoItem: public RsGRouterItem, public GRouterRoutingInfo,
|
||||
class RsGRouterSerialiser: public RsServiceSerializer
|
||||
{
|
||||
public:
|
||||
RsGRouterSerialiser(SerializationFlags flags = SERIALIZATION_FLAG_NONE) : RsServiceSerializer(RS_SERVICE_TYPE_GROUTER,RsGenericSerializer::FORMAT_BINARY,flags) {}
|
||||
explicit RsGRouterSerialiser(SerializationFlags flags = SERIALIZATION_FLAG_NONE) : RsServiceSerializer(RS_SERVICE_TYPE_GROUTER,RsGenericSerializer::FORMAT_BINARY,flags) {}
|
||||
|
||||
virtual RsItem *create_item(uint16_t service,uint8_t subtype) const ;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user