Skip to content

Commit 2b0e009

Browse files
committed
Fix clang-tidy error in PersistedCounter.h
Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
1 parent 13da787 commit 2b0e009

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
@@ -240,6 +240,11 @@ class PersistedCounter : public MonotonicallyIncreasingCounter<T>
240240
}
241241
else
242242
{
243+
// clang-tidy claims that we're returning without writing to 'aStartValue',
244+
// assign 0 to supppress the warning. In case of error, the value wont't be
245+
// used anyway.
246+
aStartValue = 0;
247+
243248
// TODO: Figure out how to avoid a bootloop here. Maybe we should just
244249
// init to 0? Or a random value?
245250
ReturnErrorOnFailure(err);

0 commit comments

Comments
 (0)