log: Explicitly ignoring return of memcpy

According with MISRA-C the value returned by a non-void function has
to be used. As memcpy return is almost useless, we are explicitly
ignoring it.

MISRA-C rule 17.7

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-12-17 19:08:03 -08:00 committed by Carles Cufí
commit 27435e4cb3
4 changed files with 17 additions and 13 deletions

View file

@ -105,7 +105,7 @@ static int log_backend_rtt_write_drop(void)
if (drop_cnt > 0 && !drop_warn) {
memmove(line_buf + DROP_MSG_LEN, line_buf,
line_pos - line_buf);
memcpy(line_buf, drop_msg, DROP_MSG_LEN);
(void)memcpy(line_buf, drop_msg, DROP_MSG_LEN);
line_pos += DROP_MSG_LEN;
drop_warn = 1;
}