From 272b51ba236d6636bda3ee961cba35eb489d30af Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 7 Mar 2015 11:07:31 +0000 Subject: MISRAs done for RT. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7727 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/src/chthreads.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'os/rt/src/chthreads.c') diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c index ee58694bc..b20779fcd 100644 --- a/os/rt/src/chthreads.c +++ b/os/rt/src/chthreads.c @@ -144,8 +144,12 @@ thread_t *_thread_init(thread_t *tp, tprio_t prio) { */ void _thread_memfill(uint8_t *startp, uint8_t *endp, uint8_t v) { + /*lint -save -e946 -e947 [18.2, 18.3] Normal pointers arithmetic, it + is safe.*/ while (startp < endp) { - *startp++ = v; + /*lint -restore*/ + *startp = v; + startp++; } } #endif /* CH_DBG_FILL_THREADS */ @@ -480,7 +484,7 @@ msg_t chThdWait(thread_t *tp) { chSysLock(); chDbgAssert(tp != currp, "waiting self"); #if CH_CFG_USE_DYNAMIC == TRUE - chDbgAssert(tp->p_refs > 0, "not referenced"); + chDbgAssert(tp->p_refs > 0U, "not referenced"); #endif if (tp->p_state != CH_STATE_FINAL) { list_insert(currp, &tp->p_waiting); -- cgit v1.2.3