1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Work around gcc warning

Same as 57fea81f8a.
This commit is contained in:
Eelco Dolstra 2024-11-28 15:25:51 +01:00
parent 5756caf1c3
commit e5e09006f9

View file

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