From 2caf9b4e1c85d647dcfd93c00c6bd15d4b436c7f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 15 Feb 2023 15:18:13 +0800 Subject: [PATCH] idl-compiler: mark captured this used sometime the captured `this` is used in the generated C++ code, while some time it is not. to reenable `-Wunused-lambda-capture` warning, let's mark this `this` as used. Signed-off-by: Kefu Chai --- idl-compiler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/idl-compiler.py b/idl-compiler.py index bdfa56d8a2..c94e5b9613 100755 --- a/idl-compiler.py +++ b/idl-compiler.py @@ -1477,6 +1477,7 @@ def add_view(cout, cls): fprintln(cout, reindent(4, """ auto {name}() const {{ return seastar::with_serialized_stream(v, [this] (auto& v) -> decltype({f}(std::declval(), boost::type<{full_type}>())) {{ + std::ignore = this; auto in = v; {skip} return {deser};