From e2646f9752c865888c68c252049aeaf41eac16e5 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Fri, 8 Dec 2023 15:07:23 -0500 Subject: [PATCH] fix for -O C++ lambda functions reporting errors/warnings --- src/script_opt/CPP/DeclFunc.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/script_opt/CPP/DeclFunc.cc b/src/script_opt/CPP/DeclFunc.cc index 0d9566037b..9ff0eb4134 100644 --- a/src/script_opt/CPP/DeclFunc.cc +++ b/src/script_opt/CPP/DeclFunc.cc @@ -144,6 +144,7 @@ void CPPCompile::DeclareSubclass(const FuncTypePtr& ft, const ProfileFunc* pf, c StartBlock(); Emit("flow = FLOW_RETURN;"); + Emit("f->SetOnlyCall(ce.get());"); if ( in_hook ) { Emit("if ( ! %s(%s) )", fname, args);