Merge pull request #9992 from edolstra/fix-warning

Fix "may be used uninitialized" warning

(cherry picked from commit c4ebb82da4eade975e874da600dc50e9dec610cb)
Change-Id: I0ce99bf102ad12902f7055c29a56e665b8320ca8
This commit is contained in:
eldritch horrors 2024-03-04 08:59:58 +01:00
parent bbf69a4898
commit c6064390e8

View file

@ -827,7 +827,7 @@ void Store::substitutePaths(const StorePathSet & paths)
if (!willSubstitute.empty()) if (!willSubstitute.empty())
try { try {
std::vector<DerivedPath> subs; std::vector<DerivedPath> subs;
for (auto & p : willSubstitute) subs.push_back(DerivedPath::Opaque{p}); for (auto & p : willSubstitute) subs.emplace_back(DerivedPath::Opaque{p});
buildPaths(subs); buildPaths(subs);
} catch (Error & e) { } catch (Error & e) {
logWarning(e.info()); logWarning(e.info());