Skip to content

Commit e7d098c

Browse files
danbevjasnell
authored andcommitted
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: #13188 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 81b9b85 commit e7d098c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/inspector_agent.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class JsBindingsSessionDelegate : public InspectorSessionDelegate {
215215
Local<Value> argument = v8string.ToLocalChecked().As<Value>();
216216
Local<Function> callback = callback_.Get(isolate);
217217
Local<Object> receiver = receiver_.Get(isolate);
218-
callback->Call(env_->context(), receiver, 1, &argument);
218+
static_cast<void>(callback->Call(env_->context(), receiver, 1, &argument));
219219
}
220220

221221
void Disconnect() {

0 commit comments

Comments
 (0)