From e7d098cea6c003d4a3f9f8debda975f57471974e Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 24 May 2017 09:41:14 +0200 Subject: [PATCH] src: ignore unused warning for inspector-agent.cc Currently the following compiler warning is displayed: ../src/inspector_agent.cc:218:5: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result] callback->Call(env_->context(), receiver, 1, &argument); ^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. This commit does a static cast of the result as there are tests that fail if we try to do something like ToLocalChecked. PR-URL: https://github.com/nodejs/node/pull/13188 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Refael Ackermann Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson Reviewed-By: Anna Henningsen --- src/inspector_agent.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 5af395453c04cc..a90edc5038fb2b 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -215,7 +215,7 @@ class JsBindingsSessionDelegate : public InspectorSessionDelegate { Local argument = v8string.ToLocalChecked().As(); Local callback = callback_.Get(isolate); Local receiver = receiver_.Get(isolate); - callback->Call(env_->context(), receiver, 1, &argument); + static_cast(callback->Call(env_->context(), receiver, 1, &argument)); } void Disconnect() {