Fix clang-tidy uninitialized value warning in derivation-options.cc

Make lambda capture explicit to avoid clang-analyzer-core.CallAndMessage warning
This commit is contained in:
Jörg Thalheim
2025-07-17 11:36:55 +02:00
parent 4ba3b15a10
commit 6bf940d636

View File

@@ -138,7 +138,7 @@ DerivationOptions::fromStructuredAttrs(const StringMap & env, const StructuredAt
if (auto maxClosureSize = get(output, "maxClosureSize"))
checks.maxClosureSize = maxClosureSize->get<uint64_t>();
auto get_ = [&](const std::string & name) -> std::optional<StringSet> {
auto get_ = [&output = output](const std::string & name) -> std::optional<StringSet> {
if (auto i = get(output, name)) {
StringSet res;
for (auto j = i->begin(); j != i->end(); ++j) {