From 1266648c7e86c7325dcf8f5be0cd66cb85119286 Mon Sep 17 00:00:00 2001 From: Robert Schulze <112553298+deveritec-rosc@users.noreply.github.com> Date: Thu, 6 Oct 2022 14:05:26 +0200 Subject: [PATCH] [Zephyr] remove BLE advertisement rerun flag (#23006) * remove advertisement rerun flag for Zephyr If present, debug builds will fail with `unused-variable`-error by the compiler. Code which used the variable was removed with cba92c08a8d343b0b01ff4441d2af230fa1e6900. * Restyled by clang-format Co-authored-by: Restyled.io --- src/platform/Zephyr/BLEManagerImpl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp index aeb0bfaadb7630..d65b7a903e5e34 100644 --- a/src/platform/Zephyr/BLEManagerImpl.cpp +++ b/src/platform/Zephyr/BLEManagerImpl.cpp @@ -234,8 +234,7 @@ struct BLEManagerImpl::ServiceData CHIP_ERROR BLEManagerImpl::StartAdvertising(void) { - int err = 0; - const bool isAdvertisingRerun = mFlags.Has(Flags::kAdvertising); + int err = 0; // At first run always select fast advertising, on the next attempt slow down interval. const uint32_t intervalMin = mFlags.Has(Flags::kFastAdvertisingEnabled) ? CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN