From 4b0f2cae0d31c1673059ddea0a0adda71efa9d1e Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Tue, 8 Dec 2015 17:03:18 +0000 Subject: [PATCH] fix compiler warning in scoped_timer.cpp on linux 2 secs in nanosec representation still fit in 31 bits, so no need for ULL Signed-off-by: Nuno Lopes --- src/util/scoped_timer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/scoped_timer.cpp b/src/util/scoped_timer.cpp index 6d8531023..bf3ca9b67 100644 --- a/src/util/scoped_timer.cpp +++ b/src/util/scoped_timer.cpp @@ -112,9 +112,9 @@ struct scoped_timer::imp { end_time.tv_sec += st->m_ms / 1000u; end_time.tv_nsec += (st->m_ms % 1000u) * 1000000ull; // check for overflow - if (end_time.tv_nsec >= 1000000000ull) { + if (end_time.tv_nsec >= 1000000000) { ++end_time.tv_sec; - end_time.tv_nsec -= 1000000000ull; + end_time.tv_nsec -= 1000000000; } pthread_mutex_lock(&st->m_mutex);