From 854b70fd7d9f18f4fe49ce07cbb0df1bef823898 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 29 May 2017 16:49:29 +0200 Subject: [PATCH] Prevent warning about "narrowing conversion" --- repos/libports/src/lib/libc/select.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/libports/src/lib/libc/select.cc b/repos/libports/src/lib/libc/select.cc index 3e27fba793..15cc53f1d6 100644 --- a/repos/libports/src/lib/libc/select.cc +++ b/repos/libports/src/lib/libc/select.cc @@ -262,7 +262,8 @@ _select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, { timeval const *_tv; bool const valid { _tv != nullptr }; - unsigned long duration { valid ? _tv->tv_sec*1000 + _tv->tv_usec/1000 : 0UL }; + unsigned long duration { + valid ? (unsigned long)_tv->tv_sec*1000 + _tv->tv_usec/1000 : 0UL }; bool expired() const { return valid && duration == 0; };