Skip to content

Commit

Permalink
Merge pull request #11986 from DeterminateSystems/fix-warning
Browse files Browse the repository at this point in the history
Work around gcc warning
  • Loading branch information
edolstra authored Nov 28, 2024
2 parents 5756caf + e5e0900 commit daa8ceb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/nix-env/nix-env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
});
Expand Down

0 comments on commit daa8ceb

Please sign in to comment.