@@ -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];