GeezerVison is showing github.com — src: fix some recently introduced coverity issues · nodejs/node@d0a5e7e
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/dataqueue/queue.cc +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -787,7 +787,7 @@ class FdEntry final : public EntryImpl { |
787 | 787 | public: |
788 | 788 | static std::unique_ptr<FdEntry> Create(Environment* env, Local<Value> path) { |
789 | 789 | // We're only going to create the FdEntry if the file exists. |
790 | | - uv_fs_t req; |
| 790 | + uv_fs_t req = uv_fs_t(); |
791 | 791 | auto cleanup = OnScopeLeave([&] { uv_fs_req_cleanup(&req); }); |
792 | 792 |
|
793 | 793 | auto buf = std::make_shared<BufferValue>(env->isolate(), path); |
@@ -849,7 +849,7 @@ class FdEntry final : public EntryImpl { |
849 | 849 | } |
850 | 850 |
|
851 | 851 | static bool CheckModified(FdEntry* entry, int fd) { |
852 | | - uv_fs_t req; |
| 852 | + uv_fs_t req = uv_fs_t(); |
853 | 853 | auto cleanup = OnScopeLeave([&] { uv_fs_req_cleanup(&req); }); |
854 | 854 | // TODO(jasnell): Note the use of a sync fs call here is a bit unfortunate. |
855 | 855 | // Doing this asynchronously creates a bit of a race condition tho, a file |
|
Collapse file
Copy file name to clipboardExpand all lines: test/embedding/embedtest.cc +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -75,7 +75,7 @@ int RunNodeInstance(MultiIsolatePlatform* platform, |
75 | 75 | if (snapshot_as_file_it != args.end()) { |
76 | 76 | snapshot = node::EmbedderSnapshotData::FromFile(fp); |
77 | 77 | } else { |
78 | | - uv_fs_t req; |
| 78 | + uv_fs_t req = uv_fs_t(); |
79 | 79 | int statret = uv_fs_stat(nullptr, &req, filename, nullptr); |
80 | 80 | assert(statret == 0); |
81 | 81 | size_t filesize = req.statbuf.st_size; |
|