Skip to content

Commit

Permalink
src: fix compiler warnings in node_report_module
Browse files Browse the repository at this point in the history
Currently, the following compiler warnings are generated:
../src/node_report_module.cc:
In function ‘void report::ShouldReportOnFatalError(
    const v8::FunctionCallbackInfo<v8::Value>&)’:
../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<v8::Value>&)’:
../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.

PR-URL: nodejs#32498
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
danbev authored and addaleax committed Mar 28, 2020
1 parent 05aa67a commit cd1db2d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/node_report_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,11 @@ static void SetSignal(const FunctionCallbackInfo<Value>& info) {
}

static void ShouldReportOnFatalError(const FunctionCallbackInfo<Value>& info) {
Environment* env = Environment::GetCurrent(info);
info.GetReturnValue().Set(
node::per_process::cli_options->report_on_fatalerror);
}

static void SetReportOnFatalError(const FunctionCallbackInfo<Value>& info) {
Environment* env = Environment::GetCurrent(info);
CHECK(info[0]->IsBoolean());
node::per_process::cli_options->report_on_fatalerror = info[0]->IsTrue();
}
Expand Down

0 comments on commit cd1db2d

Please sign in to comment.