From 7fe16ecc7acb6e0b8beb7b1cf6098f0b96882779 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Wed, 9 Mar 2022 16:21:52 -0500 Subject: [PATCH] src: fix coverity warnings in node_file.cc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix two warnings about a useless call and not checking a return value. Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/42272 Reviewed-By: Tobias Nießen Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Darshan Sen --- src/node_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_file.cc b/src/node_file.cc index c7c73669a17ff7..43a57d77517e24 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -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); }