Index: src/OFDate.m ================================================================== --- src/OFDate.m +++ src/OFDate.m @@ -34,11 +34,11 @@ static OFMutex *mutex; #endif #ifdef HAVE_GMTIME_R # define GMTIME_RET(field) \ - time_t sec_ = sec; \ + time_t sec_ = (time_t)sec; \ struct tm tm; \ \ if (sec != sec_) \ @throw [OFOutOfRangeException newWithClass: isa]; \ \ @@ -45,11 +45,11 @@ if (gmtime_r(&sec_, &tm) == NULL) \ @throw [OFOutOfRangeException newWithClass: isa]; \ \ return tm.field; # define LOCALTIME_RET(field) \ - time_t sec_ = sec; \ + time_t sec_ = (time_t)sec; \ struct tm tm; \ \ if (sec != sec_) \ @throw [OFOutOfRangeException newWithClass: isa]; \ \ @@ -58,11 +58,11 @@ \ return tm.field; #else # ifdef OF_THREADS # define GMTIME_RET(field) \ - time_t sec_ = sec; \ + time_t sec_ = (time_t)sec; \ struct tm *tm; \ \ if (sec != sec_) \ @throw [OFOutOfRangeException newWithClass: isa]; \ \ @@ -75,11 +75,11 @@ return tm->field; \ } @finally { \ [mutex unlock]; \ } # define LOCALTIME_RET(field) \ - time_t sec_ = sec; \ + time_t sec_ = (time_t)sec; \ struct tm *tm; \ \ if (sec != sec_) \ @throw [OFOutOfRangeException newWithClass: isa]; \ \ @@ -93,11 +93,11 @@ } @finally { \ [mutex unlock]; \ } # else # define GMTIME_RET(field) \ - time_t sec_ = sec; \ + time_t sec_ = (time_t)sec; \ struct tm *tm; \ \ if (sec != sec_) \ @throw [OFOutOfRangeException newWithClass: isa]; \ \ @@ -104,11 +104,11 @@ if ((tm = gmtime(&sec_)) == NULL) \ @throw [OFOutOfRangeException newWithClass: isa]; \ \ return tm->field; # define LOCALTIME_RET(field) \ - time_t sec_ = sec; \ + time_t sec_ = (time_t)sec; \ struct tm *tm; \ \ if (sec != sec_) \ @throw [OFOutOfRangeException newWithClass: isa]; \ \ @@ -190,11 +190,11 @@ [self release]; @throw [OFInitializationFailedException newWithClass: c]; } return [self initWithTimeIntervalSince1970: t.tv_sec - microseconds: t.tv_usec]; + microseconds: (uint32_t)t.tv_usec]; } - initWithTimeIntervalSince1970: (int64_t)sec_ { return [self initWithTimeIntervalSince1970: sec_ @@ -344,11 +344,11 @@ } - (OFString*)dateStringWithFormat: (OFString*)fmt { OFString *ret; - time_t sec_ = sec; + time_t sec_ = (time_t)sec; struct tm tm; char *buf; if (sec != sec_) @throw [OFOutOfRangeException newWithClass: isa]; @@ -390,11 +390,11 @@ } - (OFString*)localDateStringWithFormat: (OFString*)fmt { OFString *ret; - time_t sec_ = sec; + time_t sec_ = (time_t)sec; struct tm tm; char *buf; if (sec != sec_) @throw [OFOutOfRangeException newWithClass: isa]; Index: src/objc_sync.m ================================================================== --- src/objc_sync.m +++ src/objc_sync.m @@ -36,11 +36,11 @@ of_mutex_t mutex; }; static of_mutex_t mutex; static struct locks_s *locks = NULL; -static size_t num_locks = 0; +static ssize_t num_locks = 0; #define SYNC_ERR(f) \ { \ fprintf(stderr, "WARNING: %s failed in line %d!\n" \ "WARNING: This might result in a race " \ @@ -55,11 +55,11 @@ } int objc_sync_enter(id obj) { - int i; + ssize_t i; if (obj == nil) return 0; if (!of_mutex_lock(&mutex)) @@ -140,11 +140,11 @@ } int objc_sync_exit(id obj) { - int i; + ssize_t i; if (obj == nil) return 0; if (!of_mutex_lock(&mutex))