From f4ee15e9393b950b83370239e8889346b2a34688 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Mon, 30 Oct 2023 13:18:43 +0100 Subject: [PATCH] Bluetooth samples: unicast audio client: Fix build warnings In 85bb2624bc562becde8b1b6e3b570e2d4b45c7e5 init_lc3()'s prototype was changed to return an int, but the code was not updated to return something !=0 on all errors, or 0 on error. Fix it. Signed-off-by: Alberto Escolar Piedras --- samples/bluetooth/unicast_audio_client/src/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/samples/bluetooth/unicast_audio_client/src/main.c b/samples/bluetooth/unicast_audio_client/src/main.c index 0e35a7d5a3d..1dc411f7b59 100644 --- a/samples/bluetooth/unicast_audio_client/src/main.c +++ b/samples/bluetooth/unicast_audio_client/src/main.c @@ -245,17 +245,17 @@ static int init_lc3(void) if (freq_hz < 0) { printk("Error: Codec frequency not set, cannot start codec."); - return; + return -1; } if (frame_duration_us < 0) { printk("Error: Frame duration not set, cannot start codec."); - return; + return -1; } if (octets_per_frame < 0) { printk("Error: Octets per frame not set, cannot start codec."); - return; + return -1; } frame_duration_100us = frame_duration_us / 100; @@ -277,7 +277,9 @@ static int init_lc3(void) if (lc3_encoder == NULL) { printk("ERROR: Failed to setup LC3 encoder - wrong parameters?\n"); + return -1; } + return 0; } #else