From ca77eb7d3ed8ff14cb2551076e2a235258ef8040 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 3 Apr 2016 12:10:15 +0000 Subject: MISRA-related fixes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9235 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/src/chdebug.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'os/rt/src/chdebug.c') diff --git a/os/rt/src/chdebug.c b/os/rt/src/chdebug.c index aa7276417..fd6b3c92b 100644 --- a/os/rt/src/chdebug.c +++ b/os/rt/src/chdebug.c @@ -107,7 +107,7 @@ * * @notapi */ -NOINLINE static void trace_next(void) { +static NOINLINE void trace_next(void) { ch.dbg.trace_buffer.ptr->time = chVTGetSystemTimeX(); #if PORT_SUPPORTS_RT == TRUE @@ -292,12 +292,12 @@ void _dbg_trace_init(void) { ch.dbg.trace_buffer.suspended = 0U; ch.dbg.trace_buffer.size = CH_DBG_TRACE_BUFFER_SIZE; ch.dbg.trace_buffer.ptr = &ch.dbg.trace_buffer.buffer[0]; - for (i = 0U; i < CH_DBG_TRACE_BUFFER_SIZE; i++) { + for (i = 0U; i < (unsigned)CH_DBG_TRACE_BUFFER_SIZE; i++) { ch.dbg.trace_buffer.buffer[i].type = CH_TRACE_TYPE_UNUSED; } } -#if ((CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_SWITCH) != 0) || \ +#if ((CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_SWITCH) != 0U) || \ defined(__DOXYGEN__) /** * @brief Inserts in the circular debug trace buffer a context switch record. @@ -316,9 +316,9 @@ void _dbg_trace_switch(thread_t *otp) { trace_next(); } } -#endif /* (CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_SWITCH) != 0 */ +#endif /* (CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_SWITCH) != 0U */ -#if ((CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_ISR) != 0) || \ +#if ((CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_ISR) != 0U) || \ defined(__DOXYGEN__) /** * @brief Inserts in the circular debug trace buffer an ISR-enter record. @@ -357,9 +357,9 @@ void _dbg_trace_isr_leave(const char *isr) { port_unlock_from_isr(); } } -#endif /* (CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_ISR) != 0 */ +#endif /* (CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_ISR) != 0U */ -#if ((CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_HALT) != 0) || \ +#if ((CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_HALT) != 0U) || \ defined(__DOXYGEN__) /** * @brief Inserts in the circular debug trace buffer an halt record. @@ -377,9 +377,9 @@ void _dbg_trace_halt(const char *reason) { trace_next(); } } -#endif /* (CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_HALT) != 0 */ +#endif /* (CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_HALT) != 0U */ -#if ((CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_USER) != 0) || \ +#if ((CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_USER) != 0U) || \ defined(__DOXYGEN__) /** * @brief Adds an user trace record to the trace buffer. @@ -416,7 +416,7 @@ void chDbgWriteTrace(void *up1, void *up2) { chDbgWriteTraceI(up1, up2); chSysUnlock(); } -#endif /* (CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_USER) != 0 */ +#endif /* (CH_DBG_TRACE_MASK & CH_DBG_TRACE_MASK_USER) != 0U */ /** * @brief Suspends one or more trace events. -- cgit v1.2.3