From 4cae0c7b6264a168473567bd009a1448dbe3a344 Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Thu, 7 Jul 2022 15:34:26 -0700 Subject: [PATCH] Fix lambda return type inference (#20457) 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. --- 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(); },