diff --git a/src/lib/core/tests/TestCHIPCallback.cpp b/src/lib/core/tests/TestCHIPCallback.cpp index 111a8a73671802..88483dce445bc1 100644 --- a/src/lib/core/tests/TestCHIPCallback.cpp +++ b/src/lib/core/tests/TestCHIPCallback.cpp @@ -201,7 +201,7 @@ TEST_F(TestCHIPCallback, NotifierTest) { int n = 1; Callback cb(reinterpret_cast(increment_by), &n); - Callback cancelcb(reinterpret_cast(canceler), cb.Cancel()); + Callback cancelcb([](void * call, int) { canceler(reinterpret_cast(call)); }, cb.Cancel()); // safe to call anytime cb.Cancel();