From 619ca631d07218dfe04bb53e5abb855ecf2bb67a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 12 Feb 2024 15:29:48 +0100 Subject: [PATCH] Fix "may be used uninitialized" warning --- 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 439c9530c..e3715343e 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -847,7 +847,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());