Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d0a5e7e

Browse filesBrowse files
mhdawsonRafaelGSS
authored andcommitted
src: fix some recently introduced coverity issues
Signed-off-by: Michael Dawson <mdawson@devrus.com> PR-URL: #47240 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent bd4697a commit d0a5e7e
Copy full SHA for d0a5e7e

File tree

Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎src/dataqueue/queue.cc‎

Copy file name to clipboardExpand all lines: src/dataqueue/queue.cc
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ class FdEntry final : public EntryImpl {
787787
public:
788788
static std::unique_ptr<FdEntry> Create(Environment* env, Local<Value> path) {
789789
// 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();
791791
auto cleanup = OnScopeLeave([&] { uv_fs_req_cleanup(&req); });
792792

793793
auto buf = std::make_shared<BufferValue>(env->isolate(), path);
@@ -849,7 +849,7 @@ class FdEntry final : public EntryImpl {
849849
}
850850

851851
static bool CheckModified(FdEntry* entry, int fd) {
852-
uv_fs_t req;
852+
uv_fs_t req = uv_fs_t();
853853
auto cleanup = OnScopeLeave([&] { uv_fs_req_cleanup(&req); });
854854
// TODO(jasnell): Note the use of a sync fs call here is a bit unfortunate.
855855
// Doing this asynchronously creates a bit of a race condition tho, a file
Collapse file

‎test/embedding/embedtest.cc‎

Copy file name to clipboardExpand all lines: test/embedding/embedtest.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ int RunNodeInstance(MultiIsolatePlatform* platform,
7575
if (snapshot_as_file_it != args.end()) {
7676
snapshot = node::EmbedderSnapshotData::FromFile(fp);
7777
} else {
78-
uv_fs_t req;
78+
uv_fs_t req = uv_fs_t();
7979
int statret = uv_fs_stat(nullptr, &req, filename, nullptr);
8080
assert(statret == 0);
8181
size_t filesize = req.statbuf.st_size;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.