Skip to content

Commit

Permalink
src: address 3 useless call coverity warnings
Browse files Browse the repository at this point in the history
Fix the last 3 useless call reports from coverity

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #42426
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
mhdawson authored and juanarbol committed Apr 6, 2022
1 parent 6c13988 commit 2e6a66d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/inspector_js_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down
2 changes: 1 addition & 1 deletion src/node_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 2e6a66d

Please sign in to comment.