avoid unused-variable warning

Avoid warning when compiled with All warnings enabled.
.../src/NimBLEScan.cpp: In member function 'void NimBLEScanResults::dump() const':
.../src/NimBLEScan.cpp:481:22: warning: unused variable 'dev' [-Wunused-variable]
  481 |     for (const auto& dev : m_deviceVec) {
      |                      ^~~
This commit is contained in:
Michael Ammann 2025-01-03 21:28:34 +01:00 committed by h2zero
parent 765193f223
commit a9578637cb

View file

@ -478,9 +478,11 @@ void NimBLEScan::clearResults() {
* @brief Dump the scan results to the log.
*/
void NimBLEScanResults::dump() const {
#if CONFIG_NIMBLE_CPP_LOG_LEVEL >=3
for (const auto& dev : m_deviceVec) {
NIMBLE_LOGI(LOG_TAG, "- %s", dev->toString().c_str());
}
#endif
} // dump
/**