diff --git a/source/shared_lib/sources/platform/common/platform_common.cpp b/source/shared_lib/sources/platform/common/platform_common.cpp index f980213a..c9dd4a48 100644 --- a/source/shared_lib/sources/platform/common/platform_common.cpp +++ b/source/shared_lib/sources/platform/common/platform_common.cpp @@ -532,7 +532,7 @@ void writeCachedFileCRCValue(string crcCacheFile, int32 &crcValue) { if(fp != NULL) { //RandomGen random; //int offset = random.randRange(5, 15); - srand(time(NULL) + crcCacheFile.length()); + srand((unsigned long)time(NULL) + (unsigned long)crcCacheFile.length()); int offset = rand() % 15; if(offset == 0) { offset = 3; diff --git a/source/shared_lib/sources/platform/common/simple_threads.cpp b/source/shared_lib/sources/platform/common/simple_threads.cpp index 7592b228..b224ad0a 100644 --- a/source/shared_lib/sources/platform/common/simple_threads.cpp +++ b/source/shared_lib/sources/platform/common/simple_threads.cpp @@ -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()); - int consumedWorkers = 0; - for(int workerIdx = 0; workerIdx < MAX_FileCRCPreCacheThread_WORKER_THREADS; ++workerIdx) { + unsigned int consumedWorkers = 0; + for(unsigned int workerIdx = 0; workerIdx < MAX_FileCRCPreCacheThread_WORKER_THREADS; ++workerIdx) { if(getQuitStatus() == true) { SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); break; } - int currentWorkerMax = (techPaths.size() - consumedWorkers); + unsigned int currentWorkerMax = (techPaths.size() - consumedWorkers); if(currentWorkerMax > techsPerWorker) { currentWorkerMax = techsPerWorker; } vector workerTechList; - int endConsumerIndex = consumedWorkers + currentWorkerMax; + unsigned int endConsumerIndex = consumedWorkers + currentWorkerMax; for(unsigned int idx = consumedWorkers; idx < endConsumerIndex; idx++) { string techName = techPaths[idx]; workerTechList.push_back(techName);