From 8799286990fcbd2b27d48335fe3dfd181f7628b3 Mon Sep 17 00:00:00 2001 From: Pavel Vasilyev Date: Thu, 24 Aug 2023 13:56:15 +0200 Subject: [PATCH] Bluetooth: Mesh: Don't compile priv_random if Priv Beacons not enabaled This should fix unused variable issue when compiled with -Werror. Signed-off-by: Pavel Vasilyev --- subsys/bluetooth/mesh/beacon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subsys/bluetooth/mesh/beacon.c b/subsys/bluetooth/mesh/beacon.c index 94e1c3e774f..e77302e58ce 100644 --- a/subsys/bluetooth/mesh/beacon.c +++ b/subsys/bluetooth/mesh/beacon.c @@ -41,6 +41,7 @@ LOG_MODULE_REGISTER(bt_mesh_beacon); #define PROV_XMIT BT_MESH_TRANSMIT(0, 20) static struct k_work_delayable beacon_timer; +#if defined(CONFIG_BT_MESH_PRIV_BEACONS) static struct { /** * Identifier for the current Private beacon random-value. @@ -54,6 +55,7 @@ static struct { uint8_t val[13]; uint64_t timestamp; } priv_random; +#endif struct beacon_params { bool private;