From fe30b1a643ada6ab899705ec1f45e66d04896a99 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Thu, 7 Jul 2022 16:35:29 -0700 Subject: [PATCH] Fix lambda return type inference (#20457) (#20467) Some compilers (some ARM-based Linux compilers) have difficulty inferring the return type of lambdas that don't explicitly state their return type. This causes issues when passing lambdas as arguments into functions that expect a specific function signature. This fixes this specific instance in CASEServer that has this problem. Co-authored-by: Jerry Johns --- src/protocols/secure_channel/CASEServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocols/secure_channel/CASEServer.cpp b/src/protocols/secure_channel/CASEServer.cpp index 2a6a7783d6bf16..8eb131204c342b 100644 --- a/src/protocols/secure_channel/CASEServer.cpp +++ b/src/protocols/secure_channel/CASEServer.cpp @@ -162,7 +162,7 @@ void CASEServer::OnSessionEstablishmentError(CHIP_ERROR err) // from a SessionDelegate::OnSessionReleased callback. Schedule the preparation as an async work item. // mSessionManager->SystemLayer()->ScheduleWork( - [](auto * systemLayer, auto * appState) { + [](auto * systemLayer, auto * appState) -> void { CASEServer * _this = static_cast(appState); _this->PrepareForSessionEstablishment(); },