From c6064390e86b11dbec23af7525a2fa9a70666f23 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Mon, 4 Mar 2024 08:59:58 +0100 Subject: [PATCH] Merge pull request #9992 from edolstra/fix-warning Fix "may be used uninitialized" warning (cherry picked from commit c4ebb82da4eade975e874da600dc50e9dec610cb) Change-Id: I0ce99bf102ad12902f7055c29a56e665b8320ca8 --- src/libstore/store-api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 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());