From 6bf940d6366cb800b402ab070ee0fbcff1a9460f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 17 Jul 2025 11:36:55 +0200 Subject: [PATCH] Fix clang-tidy uninitialized value warning in derivation-options.cc Make lambda capture explicit to avoid clang-analyzer-core.CallAndMessage warning --- src/libstore/derivation-options.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/derivation-options.cc b/src/libstore/derivation-options.cc index f6bac2868..40c4e6d15 100644 --- a/src/libstore/derivation-options.cc +++ b/src/libstore/derivation-options.cc @@ -138,7 +138,7 @@ DerivationOptions::fromStructuredAttrs(const StringMap & env, const StructuredAt if (auto maxClosureSize = get(output, "maxClosureSize")) checks.maxClosureSize = maxClosureSize->get(); - auto get_ = [&](const std::string & name) -> std::optional { + auto get_ = [&output = output](const std::string & name) -> std::optional { if (auto i = get(output, name)) { StringSet res; for (auto j = i->begin(); j != i->end(); ++j) {