aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/osal/nil/osal.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-03-12 09:28:03 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-03-12 09:28:03 +0000
commitdb0b7ae0626ebdfc3cda7bef8bd7bad343cead23 (patch)
tree8d91763f28c60d249845695c00bbb6aa985d60ed /os/hal/osal/nil/osal.h
parentfc2af0f5896de947b3c59a9251ac4eef91ed005c (diff)
downloadChibiOS-db0b7ae0626ebdfc3cda7bef8bd7bad343cead23.tar.gz
ChibiOS-db0b7ae0626ebdfc3cda7bef8bd7bad343cead23.tar.bz2
ChibiOS-db0b7ae0626ebdfc3cda7bef8bd7bad343cead23.zip
More MISRA.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7760 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/osal/nil/osal.h')
-rw-r--r--os/hal/osal/nil/osal.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/os/hal/osal/nil/osal.h b/os/hal/osal/nil/osal.h
index 30bae35f5..9bdd9010c 100644
--- a/os/hal/osal/nil/osal.h
+++ b/os/hal/osal/nil/osal.h
@@ -120,7 +120,7 @@
/* Derived constants and error checks. */
/*===========================================================================*/
-#if !NIL_CFG_USE_EVENTS
+#if NIL_CFG_USE_EVENTS == FALSE
#error "OSAL requires NIL_CFG_USE_EVENTS=TRUE"
#endif
@@ -188,7 +188,7 @@ typedef struct event_source event_source_t;
* @note This type is not part of the OSAL API and is provided
* exclusively as an example and for convenience.
*/
-typedef void (*eventcallback_t)(event_source_t *);
+typedef void (*eventcallback_t)(event_source_t *p);
/**
* @brief Type of an event flags mask.
@@ -508,7 +508,7 @@ static inline void osalSysRestoreStatusX(syssts_t sts) {
*
* @xclass
*/
-#if PORT_SUPPORTS_RT || defined(__DOXYGEN__)
+#if (PORT_SUPPORTS_RT == TRUE) || defined(__DOXYGEN__)
static inline void osalSysPolledDelayX(rtcnt_t cycles) {
chSysPolledDelayX(cycles);
@@ -694,7 +694,7 @@ static inline void osalThreadResumeS(thread_reference_t *trp, msg_t msg) {
*/
static inline void osalThreadQueueObjectInit(threads_queue_t *tqp) {
- chSemObjectInit(&tqp->sem, 0);
+ chSemObjectInit(&tqp->sem, (cnt_t)0);
}
/**
@@ -756,8 +756,9 @@ static inline void osalEventBroadcastFlagsI(event_source_t *esp,
osalDbgCheck(esp != NULL);
esp->flags |= flags;
- if (esp->cb != NULL)
+ if (esp->cb != NULL) {
esp->cb(esp);
+ }
}
/**
@@ -811,7 +812,7 @@ static inline void osalEventSetCallback(event_source_t *esp,
*/
static inline void osalMutexObjectInit(mutex_t *mp) {
- chSemObjectInit((semaphore_t *)mp, 1);
+ chSemObjectInit((semaphore_t *)mp, (cnt_t)1);
}
/**
@@ -825,7 +826,7 @@ static inline void osalMutexObjectInit(mutex_t *mp) {
*/
static inline void osalMutexLock(mutex_t *mp) {
- chSemWait((semaphore_t *)mp);
+ (void) chSemWait((semaphore_t *)mp);
}
/**