From a7358e060af61ec853b25ed5c30fbe9b725d9422 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 27 Mar 2010 15:44:18 +0000 Subject: [PATCH] suppressed some uninitialized memory reads git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5.0@2646 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/rsiface/rstypes.h | 2 +- libretroshare/src/services/p3ranking.cc | 2 +- libretroshare/src/util/rsthreads.cc | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/rsiface/rstypes.h b/libretroshare/src/rsiface/rstypes.h index a4168d8c2..d2fe053cb 100644 --- a/libretroshare/src/rsiface/rstypes.h +++ b/libretroshare/src/rsiface/rstypes.h @@ -138,7 +138,7 @@ class RsConfig firewalled = forwardPort = false ; maxDownloadDataRate = maxUploadDataRate = maxIndivDataRate = 0 ; promptAtBoot = 0 ; - DHTActive = uPnPActive = netLocalOk = netDhtOk = netStunOk = netExtraAddressOk = false ; + DHTActive = uPnPActive = netLocalOk = netUpnpOk = netDhtOk = netStunOk = netExtraAddressOk = false ; uPnPState = DHTPeers = 0 ; } std::string ownId; diff --git a/libretroshare/src/services/p3ranking.cc b/libretroshare/src/services/p3ranking.cc index 1d0894f31..4175d980e 100644 --- a/libretroshare/src/services/p3ranking.cc +++ b/libretroshare/src/services/p3ranking.cc @@ -423,6 +423,7 @@ void p3Ranking::addRankMsg(RsRankLinkMsg *msg) RankGroup grp; grp.rid = rid; grp.ownTag = false; + grp.rank = 0.0f; /*************************************************************************/ /****************************** LINK SPECIFIC ****************************/ @@ -438,7 +439,6 @@ void p3Ranking::addRankMsg(RsRankLinkMsg *msg) mData[rid] = grp; it = mData.find(rid); - if (id == "") { #ifdef RANK_DEBUG diff --git a/libretroshare/src/util/rsthreads.cc b/libretroshare/src/util/rsthreads.cc index 0a8c24357..acc4657bb 100644 --- a/libretroshare/src/util/rsthreads.cc +++ b/libretroshare/src/util/rsthreads.cc @@ -95,6 +95,7 @@ RsQueueThread::RsQueueThread(uint32_t min, uint32_t max, double relaxFactor ) :mMinSleep(min), mMaxSleep(max), mRelaxFactor(relaxFactor) { mLastSleep = (uint32_t)mMinSleep ; + mLastWork = time(NULL) ; } void RsQueueThread::run()