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:
Rafał Kuźnia 2023-07-31 13:29:43 +02:00 committed by Carles Cufí
commit edc21bd50c

View file

@ -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;