Skip to content

Commit 052657c

Browse files
committed
Disable the check via a nolint
1 parent 58bcae6 commit 052657c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/dnssd/tests/TestActiveResolveAttempts.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ TEST(TestActiveResolveAttempts, TestLRU)
268268
std::optional<ActiveResolveAttempts::ScheduledAttempt> s = attempts.NextScheduled();
269269
while (s.has_value())
270270
{
271-
EXPECT_NE(s.value().ResolveData().peerId.GetNodeId(), 9999u);
271+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access): this is checked in the while loop
272+
EXPECT_NE(s->ResolveData().peerId.GetNodeId(), 9999u);
272273
s = attempts.NextScheduled();
273274
}
274275
}

0 commit comments

Comments
 (0)