about summary refs log tree commit diff
path: root/third_party/nix/src/nix-prefetch-url
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/nix-prefetch-url')
-rw-r--r--third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc b/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc
index dc0dce345bcd..0e5b2ec8a537 100644
--- a/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc
+++ b/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc
@@ -33,7 +33,7 @@ std::string resolveMirrorUri(EvalState& state, std::string uri) {
   }
   std::string mirrorName(s, 0, p);
 
-  Value vMirrors;
+  Value vMirrors{};
   state.eval(
       state.parseExprFromString(
           "import <nixpkgs/pkgs/build-support/fetchurl/mirrors.nix>", "."),
@@ -120,7 +120,7 @@ static int _main(int argc, char** argv) {
     } else {
       Path path =
           resolveExprPath(lookupFileArg(*state, args.empty() ? "." : args[0]));
-      Value vRoot;
+      Value vRoot{};
       state->evalFile(path, vRoot);
       Value& v(*findAlongAttrPath(*state, attrPath, autoArgs, vRoot));
       state->forceAttrs(v);
@@ -180,7 +180,7 @@ static int _main(int argc, char** argv) {
       auto actualUri = resolveMirrorUri(*state, uri);
 
       AutoDelete tmpDir(createTempDir(), true);
-      Path tmpFile = (Path)tmpDir + "/tmp";
+      Path tmpFile = Path(tmpDir) + "/tmp";
 
       /* Download the file. */
       {
@@ -200,7 +200,7 @@ static int _main(int argc, char** argv) {
       /* Optionally unpack the file. */
       if (unpack) {
         LOG(INFO) << "unpacking...";
-        Path unpacked = (Path)tmpDir + "/unpacked";
+        Path unpacked = Path(tmpDir) + "/unpacked";
         createDirs(unpacked);
         if (absl::EndsWith(baseNameOf(uri), ".zip")) {
           runProgram("unzip", true, {"-qq", tmpFile, "-d", unpacked});