Skip to content

Commit 5fe1ba8

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

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
@@ -229,6 +229,11 @@ class PersistedCounter : public MonotonicallyIncreasingCounter<T>
229229
T valueLE = GetInitialCounterValue();
230230
uint16_t size = sizeof(valueLE);
231231

232+
// clang-tidy claims that we're returning without writing to 'aStartValue',
233+
// assign 0 to supppress the warning. In case of error, the value wont't be
234+
// used anyway.
235+
aStartValue = 0;
236+
232237
VerifyOrReturnError(mKey.IsInitialized(), CHIP_ERROR_INCORRECT_STATE);
233238

234239
CHIP_ERROR err = mStorage->SyncGetKeyValue(mKey.KeyName(), &valueLE, size);

0 commit comments

Comments
 (0)