1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

Merge pull request #11986 from DeterminateSystems/fix-warning

Work around gcc warning
This commit is contained in:
Eelco Dolstra 2024-11-28 16:13:30 +01:00 committed by GitHub
commit daa8ceb022
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -481,12 +481,13 @@ static void printMissing(EvalState & state, PackageInfos & elems)
{ {
std::vector<DerivedPath> targets; std::vector<DerivedPath> targets;
for (auto & i : elems) for (auto & i : elems)
if (auto drvPath = i.queryDrvPath()) if (auto drvPath = i.queryDrvPath()) {
targets.emplace_back(DerivedPath::Built{ auto path = DerivedPath::Built{
.drvPath = makeConstantStorePathRef(*drvPath), .drvPath = makeConstantStorePathRef(*drvPath),
.outputs = OutputsSpec::All { }, .outputs = OutputsSpec::All { },
}); };
else targets.emplace_back(std::move(path));
} else
targets.emplace_back(DerivedPath::Opaque{ targets.emplace_back(DerivedPath::Opaque{
.path = i.queryOutPath(), .path = i.queryOutPath(),
}); });