diff --git a/libretroshare/src/dbase/fimonitor.cc b/libretroshare/src/dbase/fimonitor.cc index 6cb29aa9c..b475225f3 100644 --- a/libretroshare/src/dbase/fimonitor.cc +++ b/libretroshare/src/dbase/fimonitor.cc @@ -199,7 +199,7 @@ bool HashCache::find(const std::string& full_path,uint64_t size,time_t time_stam time_t now = time(NULL) ; std::map::iterator it(_files.find(full_path)) ; - if(it != _files.end() && time_stamp == it->second.modf_stamp && size == it->second.size) + if(it != _files.end() && (uint64_t)time_stamp == it->second.modf_stamp && size == it->second.size) { hash = it->second.hash ; it->second.time_stamp = now ; @@ -244,7 +244,7 @@ void HashCache::clean() #endif for(std::map::iterator it(_files.begin());it!=_files.end();) - if(it->second.time_stamp + duration < now) + if(it->second.time_stamp + duration < (uint64_t)now) { #ifdef FIM_DEBUG std::cerr << " Entry too old: " << it->first << ", ts=" << it->second.time_stamp << std::endl ; diff --git a/libretroshare/src/dbase/fimonitor.h b/libretroshare/src/dbase/fimonitor.h index 8d9f1a1f2..f725c5ee3 100644 --- a/libretroshare/src/dbase/fimonitor.h +++ b/libretroshare/src/dbase/fimonitor.h @@ -84,8 +84,8 @@ class HashCache typedef struct { uint64_t size ; - time_t time_stamp ; - time_t modf_stamp ; + uint64_t time_stamp ; + uint64_t modf_stamp ; std::string hash ; } HashCacheInfo ;