aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/rt/include/chtime.h3
-rw-r--r--test/rt/testbuild/chconf.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/os/rt/include/chtime.h b/os/rt/include/chtime.h
index 73d278a77..b2fc9d5d0 100644
--- a/os/rt/include/chtime.h
+++ b/os/rt/include/chtime.h
@@ -490,7 +490,10 @@ static inline systime_t chTimeAddX(systime_t systime,
*/
static inline sysinterval_t chTimeDiffX(systime_t start, systime_t end) {
+ /*lint -save -e9033 [10.8] This cast is required by the operation, it is
+ known that the destination type can be wider.*/
return (sysinterval_t)((systime_t)(end - start));
+ /*lint -restore*/
}
/**
diff --git a/test/rt/testbuild/chconf.h b/test/rt/testbuild/chconf.h
index 87b6c7b2d..f652bbecd 100644
--- a/test/rt/testbuild/chconf.h
+++ b/test/rt/testbuild/chconf.h
@@ -59,13 +59,17 @@
* @brief Time intervals data size.
* @note Allowed values are 16, 32 or 64 bits.
*/
+#if !defined(CH_CFG_INTERVALS_SIZE) || defined(__DOXYGEN__)
#define CH_CFG_INTERVALS_SIZE 32
+#endif
/**
* @brief Time types data size.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_TIME_TYPES_SIZE) || defined(__DOXYGEN__)
#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.