From 7a4a94a54f5a63ec03cc7396b6d7fc2e426fc269 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 13 Jun 2019 11:03:53 +0200 Subject: [PATCH] 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(+) diff --git a/src/node_worker.cc b/src/node_worker.cc index a98b81065932df..c05e3a9c14c733 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([&]() {