From 6be04476dc076fc1f054d9b905616bfb65c9ff75 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 28 Jan 2020 13:16:19 +0100 Subject: [PATCH] Shut up warning --- src/nix/installables.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/nix/installables.cc b/src/nix/installables.cc index 85b090bfc..8e4b53308 100644 --- a/src/nix/installables.cc +++ b/src/nix/installables.cc @@ -434,10 +434,6 @@ std::vector> SourceExprCommand::parseInstallables( }; for (auto & s : ss) { - - size_t hash; - std::optional storePath; - if (hasPrefix(s, "nixpkgs.")) { bool static warned; warnOnce(warned, "the syntax 'nixpkgs.' is deprecated; use 'nixpkgs:' instead"); @@ -454,6 +450,7 @@ std::vector> SourceExprCommand::parseInstallables( fragment == "" ? getDefaultFlakeAttrPaths() : Strings{fragment}, getDefaultFlakeAttrPathPrefixes())); } else { + std::optional storePath; if (s.find('/') != std::string::npos && (storePath = follow(s))) result.push_back(std::make_shared(store, store->printStorePath(*storePath))); else