From 43c2527d51fd05170f69d3d714c62911f4d7e07b Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 26 Mar 2020 05:22:30 +0100 Subject: [PATCH] src: fix compiler warnings in node_report_module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, the following compiler warnings are generated: ../src/node_report_module.cc: In function ‘void report::ShouldReportOnFatalError( const v8::FunctionCallbackInfo&)’: ../src/node_report_module.cc:132:16: warning: unused variable ‘env’ [-Wunused-variable] 132 | Environment* env = Environment::GetCurrent(info); | ^~~ ../src/node_report_module.cc: In function ‘void report::SetReportOnFatalError( const v8::FunctionCallbackInfo&)’: ../src/node_report_module.cc:138:16: warning: unused variable ‘env’ [-Wunused-variable] 138 | Environment* env = Environment::GetCurrent(info); | ^~~ This commit removes the unused variables. --- src/node_report_module.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/node_report_module.cc b/src/node_report_module.cc index 769511ec468af2..dfcae53be1313f 100644 --- a/src/node_report_module.cc +++ b/src/node_report_module.cc @@ -129,13 +129,11 @@ static void SetSignal(const FunctionCallbackInfo& info) { } static void ShouldReportOnFatalError(const FunctionCallbackInfo& info) { - Environment* env = Environment::GetCurrent(info); info.GetReturnValue().Set( node::per_process::cli_options->report_on_fatalerror); } static void SetReportOnFatalError(const FunctionCallbackInfo& info) { - Environment* env = Environment::GetCurrent(info); CHECK(info[0]->IsBoolean()); node::per_process::cli_options->report_on_fatalerror = info[0]->IsTrue(); }