Skip to content

Commit a957863

Browse files
mazgchh2zero
authored andcommitted
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) { | ^~~
1 parent 765193f commit a957863

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/NimBLEScan.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,11 @@ void NimBLEScan::clearResults() {
478478
* @brief Dump the scan results to the log.
479479
*/
480480
void NimBLEScanResults::dump() const {
481+
#if CONFIG_NIMBLE_CPP_LOG_LEVEL >=3
481482
for (const auto& dev : m_deviceVec) {
482483
NIMBLE_LOGI(LOG_TAG, "- %s", dev->toString().c_str());
483484
}
485+
#endif
484486
} // dump
485487

486488
/**

0 commit comments

Comments
 (0)