Fixed a bunch of warnings in safe ways

This commit is contained in:
Gio 2016-10-12 20:43:38 +02:00
parent 3c5e12ae84
commit 633a6cf8c2
13 changed files with 41 additions and 48 deletions

View file

@ -727,14 +727,13 @@ bool ftController::completeFile(const RsFileHash& hash)
std::string path;
std::string name;
uint64_t size = 0;
uint32_t state = 0;
uint32_t period = 0;
TransferRequestFlags flags ;
TransferRequestFlags extraflags ;
uint32_t completeCount = 0;
{
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
RS_STACK_MUTEX(ctrlMutex);
#ifdef CONTROL_DEBUG
std::cerr << "ftController:completeFile(" << hash << ")";
@ -816,7 +815,6 @@ bool ftController::completeFile(const RsFileHash& hash)
name = fc->mName;
//hash = fc->mHash;
size = fc->mSize;
state = fc->mState;
period = 30 * 24 * 3600; /* 30 days */
extraflags.clear() ;
@ -837,7 +835,7 @@ bool ftController::completeFile(const RsFileHash& hash)
if(flags & RS_FILE_REQ_ANONYMOUS_ROUTING)
mTurtle->stopMonitoringTunnels(hash_to_suppress) ;
} /******* UNLOCKED ********/
} // UNLOCK: RS_STACK_MUTEX(ctrlMutex);
/******************** NO Mutex from Now ********************