From 33cbdb33e43440f3fa88f36510403e8fabd49b72 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 21 Mar 2022 13:48:27 -0400 Subject: [PATCH] src: address 3 useless call coverity warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the last 3 useless call reports from coverity Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/42426 Reviewed-By: Matteo Collina Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Paolo Insogna Reviewed-By: Anna Henningsen Reviewed-By: Richard Lau Reviewed-By: Darshan Sen Reviewed-By: Tobias Nießen --- src/inspector_js_api.cc | 4 ++-- src/node_http2.cc | 1 - src/node_url.cc | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/inspector_js_api.cc b/src/inspector_js_api.cc index 8de1f8e7b0a88d..e605c1c4d6f087 100644 --- a/src/inspector_js_api.cc +++ b/src/inspector_js_api.cc @@ -215,10 +215,10 @@ void InspectorConsoleCall(const FunctionCallbackInfo& info) { Local node_method = info[1]; CHECK(node_method->IsFunction()); - node_method.As()->Call(context, + USE(node_method.As()->Call(context, info.Holder(), call_args.length(), - call_args.out()).FromMaybe(Local()); + call_args.out())); } static void* GetAsyncTask(int64_t asyncId) { diff --git a/src/node_http2.cc b/src/node_http2.cc index cf1aa81d32c3ae..e0786677264b2e 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -2646,7 +2646,6 @@ void Http2Session::New(const FunctionCallbackInfo& args) { static_cast( 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 9f22fa069804f5..b13c94f030fa59 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()); + USE(cb->Call(context, recv, arraysize(argv), argv)); } else if (error_cb->IsFunction()) { Local flags = Integer::NewFromUnsigned(isolate, url.flags); USE(error_cb.As()->Call(context, recv, 1, &flags));