Skip to content

Commit 0f1f838

Browse files
committed
Bluetooth: CAP: Mark err used for assert as __maybe_unused
If asserts are disabled, then `err` is unused can caused a compiler warning. Signed-off-by: Emil Gydesen <[email protected]>
1 parent cfc133d commit 0f1f838

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

subsys/bluetooth/audio/cap_handover.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <zephyr/logging/log.h>
2424
#include <zephyr/sys/__assert.h>
2525
#include <zephyr/sys/util.h>
26+
#include <zephyr/toolchain.h>
2627

2728
#include "bap_endpoint.h"
2829
#include "cap_internal.h"
@@ -146,7 +147,7 @@ void bt_cap_handover_broadcast_source_stopped(uint8_t reason)
146147
if (proc_param->is_unicast_to_broadcast) {
147148
LOG_DBG("Unexpected broadcast source stop with reason 0x%02x", reason);
148149

149-
const int err = bt_cap_initiator_broadcast_audio_delete(
150+
__maybe_unused const int err = bt_cap_initiator_broadcast_audio_delete(
150151
proc_param->unicast_to_broadcast.broadcast_source);
151152

152153
__ASSERT_NO_MSG(err == 0);

0 commit comments

Comments
 (0)