zephyr/subsys/bluetooth
Alberto Escolar Piedras 59b62243fa Bluetooth: HFP_AG: Initialize variable to avoid warning
gcc 11.4.0, seems to believe this variable may be used uninitialized,
and warns about it (causing a test build failure due to warnings
being treated as errors).
Let's just initialize the variable to 0 to avoid the issue, as the
cost is trivial.

subsys/bluetooth/host/classic/hfp_ag.c: In function
  ‘bt_hfp_ag_vts_handler’:
1095
subsys/bluetooth/host/classic/hfp_ag.c:3091:17: error: ‘code’ may be
  used uninitialized in this function [-Werror=maybe-uninitialized]
1096
 3091 |                 bt_ag->transmit_dtmf_code(ag, code);
1097
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1098

The issue can be reproduced for ex. with:
$ mkdir build ; cd build
$ cmake -GNinja -DBOARD=native_sim/native/64 ../tests/bluetooth/shell \
 -DCONF_FILE="prj_br.conf"
$ ninja

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-04-04 18:18:16 +02:00
..
audio Bluetooth: BAP: Fix bad cast to void * instead of void for memcpy 2025-04-04 18:16:54 +02:00
common subsys/bluetooth: Misc native_posix cleanup 2025-03-12 02:27:36 +01:00
controller Bluetooth: Controller: Single recv thread for HCI-only builds 2025-04-04 09:35:16 +02:00
crypto Bluetooth: crypto: add select PSA_WANT_ALG_ECB_NO_PADDING 2025-01-15 22:57:20 +01:00
host Bluetooth: HFP_AG: Initialize variable to avoid warning 2025-04-04 18:18:16 +02:00
lib
mesh Bluetooth: Mesh: Shell: fixes publication period calculation 2025-03-31 19:48:10 -04:00
services Bluetooth: Fixed null byte check in DIS UDI 2025-03-31 19:50:12 -04:00
CMakeLists.txt Bluetooth: Controller: Replace BT_CTLR with HAS_BT_CTLR 2024-12-03 10:16:44 +01:00
Kconfig bluetooth: host: Remove experimental flag from LE Connection Subrating 2025-03-17 13:57:03 +01:00
Kconfig.adv Bluetooth: Host: Remove experimental label from PAwR 2025-03-14 17:56:18 +01:00
Kconfig.logging