From db0b7ae0626ebdfc3cda7bef8bd7bad343cead23 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Thu, 12 Mar 2015 09:28:03 +0000 Subject: More MISRA. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7760 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/nil/src/nil.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'os/nil/src') diff --git a/os/nil/src/nil.c b/os/nil/src/nil.c index c1a522d02..9254acbc0 100644 --- a/os/nil/src/nil.c +++ b/os/nil/src/nil.c @@ -189,7 +189,7 @@ void chSysTimerHandlerI(void) { if (tp->timeout > (systime_t)0) { chDbgAssert(!NIL_THD_IS_READY(tp), "is ready"); - chDbgAssert(tp->timeout >= nil.nexttime - nil.lasttime, "skipped one"); + chDbgAssert(tp->timeout >= (nil.nexttime - nil.lasttime), "skipped one"); tp->timeout -= nil.nexttime - nil.lasttime; if (tp->timeout == (systime_t)0) { @@ -381,8 +381,9 @@ msg_t chSchGoSleepTimeoutS(tstate_t newstate, systime_t timeout) { /* TIMEDELTA makes sure to have enough time to reprogram the timer before the free-running timer counter reaches the selected timeout.*/ - if (timeout < NIL_CFG_ST_TIMEDELTA) - timeout = NIL_CFG_ST_TIMEDELTA; + if (timeout < (systime_t)NIL_CFG_ST_TIMEDELTA) { + timeout = (systime_t)NIL_CFG_ST_TIMEDELTA; + } /* Absolute time of the timeout event.*/ abstime = chVTGetSystemTimeX() + timeout; @@ -485,7 +486,7 @@ void chThdResumeI(thread_reference_t *trp, msg_t msg) { void chThdSleep(systime_t timeout) { chSysLock(); - (void) chThdSleepS(timeout); + chThdSleepS(timeout); chSysUnlock(); } -- cgit v1.2.3