Skip to content

Commit 97b2ad1

Browse files
committed
Fix clang-tidy error in PersistedCounter.h
Explicitly handle `CHIP_NO_ERROR` case in `PersistedCounter::ReadStartValue` as clang-tidy claims that we're returning without writing to `aStartValue`. Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
1 parent 48b4fed commit 97b2ad1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/support/PersistedCounter.h

+5
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,11 @@ class PersistedCounter : public MonotonicallyIncreasingCounter<T>
238238
// Suppress the error.
239239
err = CHIP_NO_ERROR;
240240
}
241+
else if (err == CHIP_NO_ERROR)
242+
{
243+
// Don't return on CHIP_NO_ERROR: clang-tidy claims that we're returning
244+
// without writing to 'aStartValue' in else branch
245+
}
241246
else
242247
{
243248
// TODO: Figure out how to avoid a bootloop here. Maybe we should just

0 commit comments

Comments
 (0)