diff --git a/src/dataqueue/queue.cc b/src/dataqueue/queue.cc index 260c70ebbf2d98..3eabf425339de5 100644 --- a/src/dataqueue/queue.cc +++ b/src/dataqueue/queue.cc @@ -787,7 +787,7 @@ class FdEntry final : public EntryImpl { public: static std::unique_ptr Create(Environment* env, Local path) { // We're only going to create the FdEntry if the file exists. - uv_fs_t req; + uv_fs_t req = uv_fs_t(); auto cleanup = OnScopeLeave([&] { uv_fs_req_cleanup(&req); }); auto buf = std::make_shared(env->isolate(), path); @@ -849,7 +849,7 @@ class FdEntry final : public EntryImpl { } static bool CheckModified(FdEntry* entry, int fd) { - uv_fs_t req; + uv_fs_t req = uv_fs_t(); auto cleanup = OnScopeLeave([&] { uv_fs_req_cleanup(&req); }); // TODO(jasnell): Note the use of a sync fs call here is a bit unfortunate. // Doing this asynchronously creates a bit of a race condition tho, a file diff --git a/test/embedding/embedtest.cc b/test/embedding/embedtest.cc index bd639368acdf86..3592ccb9813228 100644 --- a/test/embedding/embedtest.cc +++ b/test/embedding/embedtest.cc @@ -75,7 +75,7 @@ int RunNodeInstance(MultiIsolatePlatform* platform, if (snapshot_as_file_it != args.end()) { snapshot = node::EmbedderSnapshotData::FromFile(fp); } else { - uv_fs_t req; + uv_fs_t req = uv_fs_t(); int statret = uv_fs_stat(nullptr, &req, filename, nullptr); assert(statret == 0); size_t filesize = req.statbuf.st_size;