Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 55ba053

Browse files
committedMar 3, 2025
Fix clang-tidy error in PersistedCounter.h
Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
1 parent 1612d52 commit 55ba053

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)
Please sign in to comment.