From 2b7dfbcdbe2ce32be7d3bd5ba007ad447c75ae8f Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 13 Jun 2019 11:03:53 +0200 Subject: 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 Reviewed-By: Richard Lau Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- src/node_worker.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/node_worker.cc') diff --git a/src/node_worker.cc b/src/node_worker.cc index a98b810659..c05e3a9c14 100644 --- a/src/node_worker.cc +++ b/src/node_worker.cc @@ -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 env_; OnScopeLeave cleanup_env([&]() { -- cgit v1.2.3