aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-02-06 19:46:31 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-02-06 19:46:31 +0000
commit3f96242b42e7c45d56255980f7f6338d0db35041 (patch)
tree473e2ff913044a3f0be8db0060d1b3c3188883a5
parent4b2c8eebabfe3e2637e314b23eedaebc4c2f1530 (diff)
downloadChibiOS-3f96242b42e7c45d56255980f7f6338d0db35041.tar.gz
ChibiOS-3f96242b42e7c45d56255980f7f6338d0db35041.tar.bz2
ChibiOS-3f96242b42e7c45d56255980f7f6338d0db35041.zip
MISRA-related fixes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11464 35acf78f-673a-0410-8e92-d51de3d6d3f4
-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.