about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/remote-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/remote-store.cc')
-rw-r--r--third_party/nix/src/libstore/remote-store.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/third_party/nix/src/libstore/remote-store.cc b/third_party/nix/src/libstore/remote-store.cc
index 33a6ec310a..b2e660dc2a 100644
--- a/third_party/nix/src/libstore/remote-store.cc
+++ b/third_party/nix/src/libstore/remote-store.cc
@@ -97,7 +97,7 @@ ref<RemoteStore::Connection> UDSRemoteStore::openConnection() {
 
   std::string socketPath = path ? *path : settings.nixDaemonSocketFile;
 
-  struct sockaddr_un addr;
+  struct sockaddr_un addr {};
   addr.sun_family = AF_UNIX;
   strncpy(addr.sun_path, socketPath.c_str(), sizeof(addr.sun_path));
   if (addr.sun_path[sizeof(addr.sun_path) - 1] != '\0') {
@@ -347,7 +347,7 @@ void RemoteStore::queryPathInfoUncached(
         throw;
       }
       if (GET_PROTOCOL_MINOR(conn->daemonVersion) >= 17) {
-        bool valid;
+        bool valid = 0;
         conn->from >> valid;
         if (!valid) {
           throw InvalidPath(format("path '%s' is not valid") % path);
@@ -543,9 +543,9 @@ BuildResult RemoteStore::buildDerivation(const Path& drvPath,
   conn->to << wopBuildDerivation << drvPath << drv << buildMode;
   conn.processStderr();
   BuildResult res;
-  unsigned int status;
+  unsigned int status = 0;
   conn->from >> status >> res.errorMsg;
-  res.status = (BuildResult::Status)status;
+  res.status = static_cast<BuildResult::Status>(status);
   return res;
 }