From 9ee3843f351767279cd9fa7c4304c28a8936a9e2 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 25 Oct 2018 08:42:39 +0200 Subject: [PATCH] timer: fix conversion error in timeout handling clang complains: comparison is always false due to limited range of data type Issue #3022 --- repos/os/src/drivers/timer/include/session_component.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/os/src/drivers/timer/include/session_component.h b/repos/os/src/drivers/timer/include/session_component.h index ac1b9a9e68..b63a2e784a 100644 --- a/repos/os/src/drivers/timer/include/session_component.h +++ b/repos/os/src/drivers/timer/include/session_component.h @@ -70,7 +70,7 @@ class Timer::Session_component : public Genode::Rpc_object, * Alarm framework takes solely relative time values, please * remove this. */ - Microseconds typed_us(us > ~0UL >> 1 ? ~0UL >> 1 : us); + Microseconds typed_us((us > ~0U >> 1) ? ~0U >> 1 : us); _timeout.schedule_one_shot(typed_us, *this); }