Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Dawson <mdawson@devrus.com>2022-03-21 20:48:27 +0300
committerMichael Dawson <mdawson@devrus.com>2022-03-29 23:49:02 +0300
commit33cbdb33e43440f3fa88f36510403e8fabd49b72 (patch)
tree432eea7beaff3fd6890bd177db3ba266bcfc3b1c /src
parent1000eb168a06cc4403454c48dd1a2f8bdfd60275 (diff)
src: address 3 useless call coverity warnings
Fix the last 3 useless call reports from coverity Signed-off-by: Michael Dawson <mdawson@devrus.com> PR-URL: https://github.com/nodejs/node/pull/42426 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src')
-rw-r--r--src/inspector_js_api.cc4
-rw-r--r--src/node_http2.cc1
-rw-r--r--src/node_url.cc2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/inspector_js_api.cc b/src/inspector_js_api.cc
index 8de1f8e7b0a..e605c1c4d6f 100644
--- a/src/inspector_js_api.cc
+++ b/src/inspector_js_api.cc
@@ -215,10 +215,10 @@ void InspectorConsoleCall(const FunctionCallbackInfo<Value>& info) {
Local<Value> node_method = info[1];
CHECK(node_method->IsFunction());
- node_method.As<Function>()->Call(context,
+ USE(node_method.As<Function>()->Call(context,
info.Holder(),
call_args.length(),
- call_args.out()).FromMaybe(Local<Value>());
+ call_args.out()));
}
static void* GetAsyncTask(int64_t asyncId) {
diff --git a/src/node_http2.cc b/src/node_http2.cc
index cf1aa81d32c..e0786677264 100644
--- a/src/node_http2.cc
+++ b/src/node_http2.cc
@@ -2646,7 +2646,6 @@ void Http2Session::New(const FunctionCallbackInfo<Value>& args) {
static_cast<SessionType>(
args[0]->Int32Value(env->context()).ToChecked());
Http2Session* session = new Http2Session(state, args.This(), type);
- session->get_async_id(); // avoid compiler warning
Debug(session, "session created");
}
diff --git a/src/node_url.cc b/src/node_url.cc
index 9f22fa06980..b13c94f030f 100644
--- a/src/node_url.cc
+++ b/src/node_url.cc
@@ -1666,7 +1666,7 @@ void Parse(Environment* env,
null, // fragment defaults to null
};
SetArgs(env, argv, url);
- cb->Call(context, recv, arraysize(argv), argv).FromMaybe(Local<Value>());
+ USE(cb->Call(context, recv, arraysize(argv), argv));
} else if (error_cb->IsFunction()) {
Local<Value> flags = Integer::NewFromUnsigned(isolate, url.flags);
USE(error_cb.As<Function>()->Call(context, recv, 1, &flags));