diff --git a/src/mutex.cpp b/src/mutex.cpp index 3c735a6b..0cf11199 100644 --- a/src/mutex.cpp +++ b/src/mutex.cpp @@ -199,7 +199,7 @@ void mutex::do_unlock() assert(res == 0); } -void mutex::do_lock(cv_state& state) +void mutex::do_lock(cv_state&) { } @@ -248,7 +248,7 @@ void try_mutex::do_unlock() assert(res == 0); } -void try_mutex::do_lock(cv_state& state) +void try_mutex::do_lock(cv_state&) { } @@ -367,7 +367,7 @@ void timed_mutex::do_unlock() assert(res == 0); } -void timed_mutex::do_lock(cv_state& state) +void timed_mutex::do_lock(cv_state&) { int res = 0; while (m_locked) diff --git a/src/once.cpp b/src/once.cpp index 8eb89521..ac3c443c 100644 --- a/src/once.cpp +++ b/src/once.cpp @@ -38,8 +38,8 @@ static void key_init() static void do_once() { - once_callback cb = reinterpret_cast(pthread_getspecific(key)); - (*cb)(); + once_callback* cb = reinterpret_cast(pthread_getspecific(key)); + (**cb)(); } } @@ -85,8 +85,8 @@ void call_once(void (*func)(), once_flag& flag) } #elif defined(BOOST_HAS_PTHREADS) pthread_once(&once, &key_init); - pthread_setspecific(key, func); - pthread_once(&flag, do_once); + pthread_setspecific(key, &func); + pthread_once(&flag, do_once); #endif } diff --git a/src/timeconv.inl b/src/timeconv.inl index 3cd66db9..55e6d64e 100644 --- a/src/timeconv.inl +++ b/src/timeconv.inl @@ -23,7 +23,7 @@ namespace { xt.sec += (milliseconds / MILLISECONDS_PER_SECOND); xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) * NANOSECONDS_PER_MILLISECOND); - if (xt.nsec > NANOSECONDS_PER_SECOND) + if (xt.nsec > static_cast(NANOSECONDS_PER_SECOND)) { ++xt.sec; xt.nsec -= NANOSECONDS_PER_SECOND;