Skip to content

Commit

Permalink
src: fix compiler warning in node_worker.cc
Browse files Browse the repository at this point in the history
Currently, when configuring --without-ssl the following compiler warning
is generated:
../src/node_worker.cc:192:10:
warning: unused variable 'inspector_started' [-Wunused-variable]
    bool inspector_started = false;
         ^
1 warning generated.

This commit adds a macro guard to the variable to avoid the warning.

PR-URL: #28198
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
danbev authored and ZYSzys committed Jun 16, 2019
1 parent 7561a38 commit 2b7dfbc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/node_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ void Worker::Run() {
Locker locker(isolate_);
Isolate::Scope isolate_scope(isolate_);
SealHandleScope outer_seal(isolate_);
#if NODE_USE_V8_PLATFORM && HAVE_INSPECTOR
bool inspector_started = false;
#endif

DeleteFnPtr<Environment, FreeEnvironment> env_;
OnScopeLeave cleanup_env([&]() {
Expand Down

0 comments on commit 2b7dfbc

Please sign in to comment.