From d317140d48767b868d02693987f2630a970f8eb5 Mon Sep 17 00:00:00 2001 From: Alain FLAISCHER Date: Wed, 24 May 2017 10:58:57 +0200 Subject: [PATCH] Add explicit long int conversion in msleep function --- sdk/userspace/include/utils/lcd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/userspace/include/utils/lcd.h b/sdk/userspace/include/utils/lcd.h index 27ac03eed..78bfd5214 100644 --- a/sdk/userspace/include/utils/lcd.h +++ b/sdk/userspace/include/utils/lcd.h @@ -46,8 +46,8 @@ extern "C" { static inline int msleep(uint64_t ms) { struct timespec sleep_time = { - .tv_sec = ms / MS_PER_SECOND, - .tv_nsec = (ms % MS_PER_SECOND) * NS_PER_MS + .tv_sec = (long int)(ms / MS_PER_SECOND), + .tv_nsec = (long int)((ms % MS_PER_SECOND) * NS_PER_MS) }; return clock_nanosleep(CLOCK_MONOTONIC, 0, &sleep_time, NULL);