Skip to content

Commit c9c0cc5

Browse files
mhdawsonjuanarbol
authored andcommitted
src: address 3 useless call coverity warnings
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]>
1 parent 9e14b0e commit c9c0cc5

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/inspector_js_api.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,10 @@ void InspectorConsoleCall(const FunctionCallbackInfo<Value>& info) {
215215

216216
Local<Value> node_method = info[1];
217217
CHECK(node_method->IsFunction());
218-
node_method.As<Function>()->Call(context,
218+
USE(node_method.As<Function>()->Call(context,
219219
info.Holder(),
220220
call_args.length(),
221-
call_args.out()).FromMaybe(Local<Value>());
221+
call_args.out()));
222222
}
223223

224224
static void* GetAsyncTask(int64_t asyncId) {

src/node_http2.cc

-1
Original file line numberDiff line numberDiff line change
@@ -2646,7 +2646,6 @@ void Http2Session::New(const FunctionCallbackInfo<Value>& args) {
26462646
static_cast<SessionType>(
26472647
args[0]->Int32Value(env->context()).ToChecked());
26482648
Http2Session* session = new Http2Session(state, args.This(), type);
2649-
session->get_async_id(); // avoid compiler warning
26502649
Debug(session, "session created");
26512650
}
26522651

src/node_url.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,7 @@ void Parse(Environment* env,
16661666
null, // fragment defaults to null
16671667
};
16681668
SetArgs(env, argv, url);
1669-
cb->Call(context, recv, arraysize(argv), argv).FromMaybe(Local<Value>());
1669+
USE(cb->Call(context, recv, arraysize(argv), argv));
16701670
} else if (error_cb->IsFunction()) {
16711671
Local<Value> flags = Integer::NewFromUnsigned(isolate, url.flags);
16721672
USE(error_cb.As<Function>()->Call(context, recv, 1, &flags));

0 commit comments

Comments
 (0)