diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-04 08:59:58 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-04 08:59:58 +0100 |
commit | c6064390e86b11dbec23af7525a2fa9a70666f23 (patch) | |
tree | e9f5b2490be4694214dbd2689e69a1b0f5fe17e2 | |
parent | bbf69a4898c1ea855b7e7e754a2dcdefa2be1f72 (diff) |
Merge pull request #9992 from edolstra/fix-warning
Fix "may be used uninitialized" warning
(cherry picked from commit c4ebb82da4eade975e874da600dc50e9dec610cb)
Change-Id: I0ce99bf102ad12902f7055c29a56e665b8320ca8
-rw-r--r-- | src/libstore/store-api.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index b787ac2f2..9a6c920f7 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -827,7 +827,7 @@ void Store::substitutePaths(const StorePathSet & paths) if (!willSubstitute.empty()) try { 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); } catch (Error & e) { logWarning(e.info()); |