aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-04-21 21:20:52 +0200
committerDavid Robillard <d@drobilla.net>2019-04-21 21:38:07 +0200
commita6541d25a684564bb810c3b22536a0427e4442f9 (patch)
tree9ebd73dcc3f9dd69c744d2045d38b45cf86c9a02
parent7f74a423015a98e9ed4e2778e6042e82077b4e16 (diff)
downloadraul-a6541d25a684564bb810c3b22536a0427e4442f9.tar.gz
raul-a6541d25a684564bb810c3b22536a0427e4442f9.tar.bz2
raul-a6541d25a684564bb810c3b22536a0427e4442f9.zip
Fix implicit narrowing conversion
-rw-r--r--raul/Semaphore.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/raul/Semaphore.hpp b/raul/Semaphore.hpp
index 1c6ee71..0eb1703 100644
--- a/raul/Semaphore.hpp
+++ b/raul/Semaphore.hpp
@@ -256,7 +256,8 @@ Semaphore::timed_wait(const std::chrono::duration<Rep, Period>& wait)
const chr::seconds end_sec(chr::duration_cast<chr::seconds>(end));
const chr::nanoseconds end_nsec(end - end_sec);
- const struct timespec ts_end = { end_sec.count(), end_nsec.count() };
+ const struct timespec ts_end = { static_cast<time_t>(end_sec.count()),
+ static_cast<long>(end_nsec.count()) };
return (sem_timedwait(&_sem, &ts_end) == 0);
}