Skip to content

Commit c966f61

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 84f195f commit c966f61

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/NimBLEScan.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,10 @@ void NimBLEScan::clearResults() {
480480
void NimBLEScanResults::dump() const {
481481
for (const auto& dev : m_deviceVec) {
482482
NIMBLE_LOGI(LOG_TAG, "- %s", dev->toString().c_str());
483-
}
483+
#if CONFIG_NIMBLE_CPP_LOG_LEVEL < 3
484+
(void)dev;
485+
#endif
486+
}
484487
} // dump
485488

486489
/**

0 commit comments

Comments
 (0)