From 47d047ed996b0ab430076a72288dd991f08ae06c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 11 Jul 2015 15:55:40 +0000 Subject: Silenced a MISRA by adding parenthesis. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8080 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/nil/include/nil.h | 8 ++++---- os/rt/include/chvt.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'os') diff --git a/os/nil/include/nil.h b/os/nil/include/nil.h index 99dfc7f96..0b40e3815 100644 --- a/os/nil/include/nil.h +++ b/os/nil/include/nil.h @@ -618,8 +618,8 @@ struct nil_system { * @api */ #define MS2ST(msec) \ - ((systime_t)((((uint32_t)(msec)) * \ - ((uint32_t)NIL_CFG_ST_FREQUENCY) + 999UL) / 1000UL)) + ((systime_t)(((((uint32_t)(msec)) * \ + ((uint32_t)NIL_CFG_ST_FREQUENCY)) + 999UL) / 1000UL)) /** * @brief Microseconds to system ticks. @@ -632,8 +632,8 @@ struct nil_system { * @api */ #define US2ST(usec) \ - ((systime_t)((((uint32_t)(usec)) * \ - ((uint32_t)NIL_CFG_ST_FREQUENCY) + 999999UL) / 1000000UL)) + ((systime_t)(((((uint32_t)(usec)) * \ + ((uint32_t)NIL_CFG_ST_FREQUENCY)) + 999999UL) / 1000000UL)) /** @} */ /** diff --git a/os/rt/include/chvt.h b/os/rt/include/chvt.h index de5ee765d..93c665f63 100644 --- a/os/rt/include/chvt.h +++ b/os/rt/include/chvt.h @@ -118,8 +118,8 @@ * @api */ #define MS2ST(msec) \ - ((systime_t)((((uint32_t)(msec)) * \ - ((uint32_t)CH_CFG_ST_FREQUENCY) + 999UL) / 1000UL)) + ((systime_t)(((((uint32_t)(msec)) * \ + ((uint32_t)CH_CFG_ST_FREQUENCY)) + 999UL) / 1000UL)) /** * @brief Microseconds to system ticks. @@ -132,8 +132,8 @@ * @api */ #define US2ST(usec) \ - ((systime_t)((((uint32_t)(usec)) * \ - ((uint32_t)CH_CFG_ST_FREQUENCY) + 999999UL) / 1000000UL)) + ((systime_t)(((((uint32_t)(usec)) * \ + ((uint32_t)CH_CFG_ST_FREQUENCY)) + 999999UL) / 1000000UL)) /** * @brief System ticks to seconds. -- cgit v1.2.3