From: Jan Beich Date: Sun, 15 Apr 2018 04:02:42 +0000 (+0000) Subject: Explicitly use long with boost::posix_time X-Git-Tag: v2.8.3~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3ecf83bfbb7151eef51213f9c594e403291ede5;p=icinga2 Explicitly use long with boost::posix_time --- diff --git a/lib/base/timer.cpp b/lib/base/timer.cpp index 293003852..4f0f0f35c 100644 --- a/lib/base/timer.cpp +++ b/lib/base/timer.cpp @@ -266,7 +266,7 @@ void Timer::TimerThreadProc(void) if (wait > 0.01) { /* Wait for the next timer. */ - l_TimerCV.timed_wait(lock, boost::posix_time::milliseconds(wait * 1000)); + l_TimerCV.timed_wait(lock, boost::posix_time::milliseconds(long(wait * 1000))); continue; } diff --git a/lib/checker/checkercomponent.cpp b/lib/checker/checkercomponent.cpp index 65098d6c3..f43648c43 100644 --- a/lib/checker/checkercomponent.cpp +++ b/lib/checker/checkercomponent.cpp @@ -130,7 +130,7 @@ void CheckerComponent::CheckThreadProc(void) if (wait > 0) { /* Wait for the next check. */ - m_CV.timed_wait(lock, boost::posix_time::milliseconds(wait * 1000)); + m_CV.timed_wait(lock, boost::posix_time::milliseconds(long(wait * 1000))); continue; } diff --git a/lib/remote/eventqueue.cpp b/lib/remote/eventqueue.cpp index 77c1eec0f..c54b91716 100644 --- a/lib/remote/eventqueue.cpp +++ b/lib/remote/eventqueue.cpp @@ -114,7 +114,7 @@ Dictionary::Ptr EventQueue::WaitForEvent(void *client, double timeout) return result; } - if (!m_CV.timed_wait(lock, boost::posix_time::milliseconds(timeout * 1000))) + if (!m_CV.timed_wait(lock, boost::posix_time::milliseconds(long(timeout * 1000)))) return Dictionary::Ptr(); } }