mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
Fix CppCheck in p3grouter
/libretroshare/src/grouter/p3grouter.cc:2295: warning: Cppcheck(cstyleCast): C-style pointer casting /libretroshare/src/grouter/p3grouter.h:82: warning: Cppcheck(uninitMemberVar): Member variable 'GRouterDataInfo::last_activity_TS' is not initialized in the constructor. /libretroshare/src/grouter/p3grouter.cc:206: warning: Cppcheck(uninitMemberVar): Member variable 'p3GRouter::mTurtle' is not initialized in the constructor. /libretroshare/src/grouter/p3grouter.cc:206: warning: Cppcheck(uninitMemberVar): Member variable 'p3GRouter::mLinkMgr' is not initialized in the constructor.
This commit is contained in:
parent
10721945a3
commit
f81c6aea03
@ -204,7 +204,7 @@
|
||||
const std::string p3GRouter::SERVICE_INFO_APP_NAME = "Global Router" ;
|
||||
|
||||
p3GRouter::p3GRouter(p3ServiceControl *sc, RsGixs *is)
|
||||
: p3Service(), p3Config(), mServiceControl(sc), mGixs(is), grMtx("GRouter")
|
||||
: p3Service(), p3Config(), mServiceControl(sc), mTurtle(NULL), mGixs(is), grMtx("GRouter")
|
||||
{
|
||||
addSerialType(new RsGRouterSerialiser()) ;
|
||||
|
||||
@ -2292,6 +2292,8 @@ bool p3GRouter::saveList(bool& cleanup,std::list<RsItem*>& items)
|
||||
{
|
||||
RsGRouterRoutingInfoItem *item = new RsGRouterRoutingInfoItem ;
|
||||
|
||||
#warning: Cppcheck(cstyleCast): C-style pointer casting
|
||||
// cppcheck-suppress cstyleCast
|
||||
*(GRouterRoutingInfo*)item = it->second ; // copy all members
|
||||
|
||||
item->data_item = it->second.data_item->duplicate() ; // deep copy, because we call delete on the object, and the item might be removed before we handle it in the client.
|
||||
|
@ -79,7 +79,7 @@ class GRouterDataInfo
|
||||
{
|
||||
// ! This class does not have a copy constructor that duplicates the incoming data buffer. This is on purpose!
|
||||
public:
|
||||
GRouterDataInfo()
|
||||
GRouterDataInfo() : last_activity_TS(0)
|
||||
{
|
||||
incoming_data_buffer = NULL ;
|
||||
}
|
||||
@ -339,7 +339,7 @@ private:
|
||||
p3ServiceControl *mServiceControl ;
|
||||
p3turtle *mTurtle ;
|
||||
RsGixs *mGixs ;
|
||||
p3LinkMgr *mLinkMgr ;
|
||||
//p3LinkMgr *mLinkMgr ;
|
||||
|
||||
// Multi-thread protection mutex.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user