Skip to content

Commit

Permalink
src: fix coverity warnings in node_file.cc
Browse files Browse the repository at this point in the history
Fix two warnings about a useless call and not checking
a return value.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: #42272
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
mhdawson authored and danielleadams committed Apr 24, 2022
1 parent 5b30e28 commit 7fe16ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,13 @@ inline void FileHandle::Close() {
detail.fd);
if (env->filehandle_close_warning()) {
env->set_filehandle_close_warning(false);
ProcessEmitDeprecationWarning(
USE(ProcessEmitDeprecationWarning(
env,
"Closing a FileHandle object on garbage collection is deprecated. "
"Please close FileHandle objects explicitly using "
"FileHandle.prototype.close(). In the future, an error will be "
"thrown if a file descriptor is closed during garbage collection.",
"DEP0137").IsNothing();
"DEP0137"));
}
}, CallbackFlags::kUnrefed);
}
Expand Down

0 comments on commit 7fe16ec

Please sign in to comment.