0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

src: fix compiler warning in node_worker.cc

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: https://github.com/nodejs/node/pull/28198
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Daniel Bevenius 2019-06-13 11:03:53 +02:00 committed by ZYSzys
parent 7561a38ccd
commit 2b7dfbcdbe

View File

@ -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([&]() {