- cleanup some compiler warnings

This commit is contained in:
Mark Vejvoda 2011-03-19 12:32:40 +00:00
parent 97017b2f1f
commit e2c4ae7c11
2 changed files with 5 additions and 5 deletions

View File

@ -532,7 +532,7 @@ void writeCachedFileCRCValue(string crcCacheFile, int32 &crcValue) {
if(fp != NULL) { if(fp != NULL) {
//RandomGen random; //RandomGen random;
//int offset = random.randRange(5, 15); //int offset = random.randRange(5, 15);
srand(time(NULL) + crcCacheFile.length()); srand((unsigned long)time(NULL) + (unsigned long)crcCacheFile.length());
int offset = rand() % 15; int offset = rand() % 15;
if(offset == 0) { if(offset == 0) {
offset = 3; offset = 3;

View File

@ -70,20 +70,20 @@ void FileCRCPreCacheThread::execute() {
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] techsPerWorker = %d, MAX_FileCRCPreCacheThread_WORKER_THREADS = %d, techPaths.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,techsPerWorker,MAX_FileCRCPreCacheThread_WORKER_THREADS,(int)techPaths.size()); if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] techsPerWorker = %d, MAX_FileCRCPreCacheThread_WORKER_THREADS = %d, techPaths.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,techsPerWorker,MAX_FileCRCPreCacheThread_WORKER_THREADS,(int)techPaths.size());
int consumedWorkers = 0; unsigned int consumedWorkers = 0;
for(int workerIdx = 0; workerIdx < MAX_FileCRCPreCacheThread_WORKER_THREADS; ++workerIdx) { for(unsigned int workerIdx = 0; workerIdx < MAX_FileCRCPreCacheThread_WORKER_THREADS; ++workerIdx) {
if(getQuitStatus() == true) { if(getQuitStatus() == true) {
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
break; break;
} }
int currentWorkerMax = (techPaths.size() - consumedWorkers); unsigned int currentWorkerMax = (techPaths.size() - consumedWorkers);
if(currentWorkerMax > techsPerWorker) { if(currentWorkerMax > techsPerWorker) {
currentWorkerMax = techsPerWorker; currentWorkerMax = techsPerWorker;
} }
vector<string> workerTechList; vector<string> workerTechList;
int endConsumerIndex = consumedWorkers + currentWorkerMax; unsigned int endConsumerIndex = consumedWorkers + currentWorkerMax;
for(unsigned int idx = consumedWorkers; idx < endConsumerIndex; idx++) { for(unsigned int idx = consumedWorkers; idx < endConsumerIndex; idx++) {
string techName = techPaths[idx]; string techName = techPaths[idx];
workerTechList.push_back(techName); workerTechList.push_back(techName);