Skip to content

Commit

Permalink
ipc: fix icmsg-me maybe-uninitialized compile warning
Browse files Browse the repository at this point in the history
The sent_bytes variable was not initialized in all possible execution
branches before return.

(cherry picked from commit edc21bd)

Original-Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
GitOrigin-RevId: edc21bd
Change-Id: I6d8cb1e448daae21e1796ab9137f58ac4f7f6249
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4738216
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Tested-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
  • Loading branch information
e-rk authored and Chromeos LUCI committed Aug 2, 2023
1 parent b7b1d1c commit acf7c4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/ipc/ipc_service/lib/icmsg_me.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit acf7c4c

Please sign in to comment.