Skip to content

Commit

Permalink
src: ignore unused warning for inspector-agent.cc
Browse files Browse the repository at this point in the history
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: #13188
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
danbev authored and jasnell committed May 28, 2017
1 parent 81b9b85 commit e7d098c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inspector_agent.cc
Expand Up @@ -215,7 +215,7 @@ class JsBindingsSessionDelegate : public InspectorSessionDelegate {
Local<Value> argument = v8string.ToLocalChecked().As<Value>(); Local<Value> argument = v8string.ToLocalChecked().As<Value>();
Local<Function> callback = callback_.Get(isolate); Local<Function> callback = callback_.Get(isolate);
Local<Object> receiver = receiver_.Get(isolate); Local<Object> receiver = receiver_.Get(isolate);
callback->Call(env_->context(), receiver, 1, &argument); static_cast<void>(callback->Call(env_->context(), receiver, 1, &argument));
} }


void Disconnect() { void Disconnect() {
Expand Down

0 comments on commit e7d098c

Please sign in to comment.