Commit 8218bf6
Bluetooth: TBS: Fix -Wsometimes-uninitialized warning
Building bluetooth.shell.audio.only_gtbs with clang warns:
subsys/bluetooth/audio/tbs.c:1646:6: error: variable 'ret' is used
uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
if (param->gtbs) {
^~~~~~~~~~~
subsys/bluetooth/audio/tbs.c:1667:9: note: uninitialized use occurs here
return ret;
^~~
subsys/bluetooth/audio/tbs.c:1646:2: note: remove the 'if' if its
condition is always true
if (param->gtbs) {
^~~~~~~~~~~~~~~~~
subsys/bluetooth/audio/tbs.c:1626:9: note: initialize the variable 'ret'
to silence this warning
int ret;
^
= 0
Signed-off-by: Tom Hughes <[email protected]>1 parent 9fca7ee commit 8218bf6
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1623 | 1623 | | |
1624 | 1624 | | |
1625 | 1625 | | |
1626 | | - | |
| 1626 | + | |
1627 | 1627 | | |
1628 | 1628 | | |
1629 | 1629 | | |
| |||
0 commit comments