From 3626cfdd1bfa4fc404e822764a2ddbf224a3197d Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 6 Feb 2018 18:22:34 +0000 Subject: MISRA-related fixes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11456 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/include/chtime.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'os/rt') diff --git a/os/rt/include/chtime.h b/os/rt/include/chtime.h index da326a8df..73d278a77 100644 --- a/os/rt/include/chtime.h +++ b/os/rt/include/chtime.h @@ -472,7 +472,9 @@ static inline time_usecs_t chTimeI2US(sysinterval_t interval) { static inline systime_t chTimeAddX(systime_t systime, sysinterval_t interval) { +#if CH_CFG_ST_RESOLUTION != CH_CFG_INTERVALS_SIZE chDbgCheck(interval <= (sysinterval_t)((systime_t)-1)); +#endif return systime + (systime_t)interval; } -- cgit v1.2.3