diff --git a/src/common/longlong.cpp b/src/common/longlong.cpp index a76f895033..1baf36f4f4 100644 --- a/src/common/longlong.cpp +++ b/src/common/longlong.cpp @@ -1075,7 +1075,7 @@ wxLongLongWx::ToString() const wxLongLong ll = *this; bool neg; - if ( ll < 0 ) + if ( ll < 0L ) { ll.Negate(); neg = TRUE; @@ -1085,9 +1085,9 @@ wxLongLongWx::ToString() const neg = FALSE; } - while ( ll != 0 ) + while ( ll != 0L ) { - result.Prepend((wxChar)(_T('0') + (ll % 10).ToLong())); + result.Prepend((wxChar)(_T('0') + (ll % 10L).ToLong())); ll /= 10; } diff --git a/src/common/timercmn.cpp b/src/common/timercmn.cpp index b40122a1fe..0f0b478fdb 100644 --- a/src/common/timercmn.cpp +++ b/src/common/timercmn.cpp @@ -167,7 +167,7 @@ bool wxTimerBase::Start(int milliseconds, bool oneShot) void wxStopWatch::Start(long t) { - m_t0 = wxGetLocalTimeMillis() - t; + m_t0 = wxGetLocalTimeMillis() - (wxLongLong)t; m_pause = 0; m_pauseCount = 0; } @@ -329,7 +329,7 @@ wxLongLong wxGetLocalTimeMillis() if ( wxGetTimeOfDay(&tp, (struct timezone *)NULL) != -1 ) { val *= tp.tv_sec; - return (val + (tp.tv_usec / 1000)); + return (val + (wxLongLong)(tp.tv_usec / 1000)); } else { diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index b4b91685b9..bdb51c7212 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -374,7 +374,7 @@ wxCondError wxConditionInternal::WaitTimeout(unsigned long milliseconds) { wxLongLong curtime = wxGetLocalTimeMillis(); curtime += milliseconds; - wxLongLong temp = curtime / 1000; + wxLongLong temp = curtime / 1000L; int sec = temp.GetLo(); temp *= 1000; temp = curtime - temp;