From 27aecfec5b85a69fd5037e4a654d701a13685b5e Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Thu, 3 Jan 2019 09:20:15 -0800 Subject: [PATCH] [posix-app] resolve "implicit conversion changes" warnings (#3426) --- src/posix/platform/sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/posix/platform/sim.c b/src/posix/platform/sim.c index 2460165ab..86f7bcf26 100644 --- a/src/posix/platform/sim.c +++ b/src/posix/platform/sim.c @@ -146,7 +146,7 @@ void otSimSendSleepEvent(const struct timeval *aTimeout) { struct Event event; - event.mDelay = aTimeout->tv_sec * kUsPerSecond + aTimeout->tv_usec; + event.mDelay = (uint64_t)aTimeout->tv_sec * kUsPerSecond + (uint64_t)aTimeout->tv_usec; event.mEvent = OT_SIM_EVENT_ALARM_FIRED; event.mDataLength = 0; @@ -203,7 +203,7 @@ void otSimProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set void otSimGetTime(struct timeval *aTime) { - aTime->tv_sec = sNow / kUsPerSecond; + aTime->tv_sec = (time_t)sNow / kUsPerSecond; aTime->tv_usec = sNow % kUsPerSecond; }