From f3bc537957e32a5ba7686c3fbd507de14b79be79 Mon Sep 17 00:00:00 2001 From: Junkyeong Kim Date: Mon, 17 Apr 2023 19:58:34 +0900 Subject: [PATCH] Fix sign extension error Change-Id: I9814ae158f31e2b11c27d82c75a4418150fb61c6 Signed-off-by: Junkyeong Kim --- backends/dummy/tdm_dummy_display.c | 2 +- backends/virtual/tdm_virtual_display.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/dummy/tdm_dummy_display.c b/backends/dummy/tdm_dummy_display.c index f2ef815..0db047d 100644 --- a/backends/dummy/tdm_dummy_display.c +++ b/backends/dummy/tdm_dummy_display.c @@ -94,7 +94,7 @@ _tdm_dummy_display_cb_timeout(void *user_data) sequence++; if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) { - tv_sec = tp.tv_sec; + tv_sec = (long)tp.tv_sec; tv_usec = tp.tv_nsec / 1000; } else { tv_sec = tv_usec = 0; diff --git a/backends/virtual/tdm_virtual_display.c b/backends/virtual/tdm_virtual_display.c index a4d523d..23d85aa 100644 --- a/backends/virtual/tdm_virtual_display.c +++ b/backends/virtual/tdm_virtual_display.c @@ -45,7 +45,7 @@ static void _tdm_virtual_get_current_time(long *tv_sec, long *tv_usec) struct timespec tp; if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) { - *tv_sec = tp.tv_sec; + *tv_sec = (long)tp.tv_sec; *tv_usec = tp.tv_nsec / 1000; } else { *tv_sec = *tv_usec = 0; -- 2.7.4