ipc: fix icmsg-me maybe-uninitialized compile warning
The sent_bytes variable was not initialized in all possible execution branches before return. Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
This commit is contained in:
parent
ee5c998257
commit
edc21bd50c
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ int icmsg_me_send(const struct icmsg_config_t *conf,
|
|||
const void *msg, size_t len)
|
||||
{
|
||||
int r;
|
||||
int sent_bytes;
|
||||
int sent_bytes = 0;
|
||||
|
||||
if (user_buffer_len_to_icmsg_buffer_len(len) >= SEND_BUF_SIZE) {
|
||||
return -EBADMSG;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue