Skip to content

Commit

Permalink
src: remove unused env variables in node_util
Browse files Browse the repository at this point in the history
Currently the following compiler warnings are generated:
../src/node_util.cc:59:16:
warning: unused variable 'env' [-Wunused-variable]
  Environment* env = Environment::GetCurrent(args);
               ^
../src/node_util.cc:78:16:
warning: unused variable 'env' [-Wunused-variable]
  Environment* env = Environment::GetCurrent(args);
               ^
2 warnings generated.

This commit removes the two unused variables.

PR-URL: #24820
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
danbev authored and MylesBorins committed Dec 7, 2018
1 parent 5f60ed7 commit 90d481e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/node_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ static void GetOwnNonIndexProperties(
}

static void GetPromiseDetails(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
// Return undefined if it's not a Promise.
if (!args[0]->IsPromise())
return;
Expand All @@ -75,7 +74,6 @@ static void GetPromiseDetails(const FunctionCallbackInfo<Value>& args) {
}

static void GetProxyDetails(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
// Return undefined if it's not a proxy.
if (!args[0]->IsProxy())
return;
Expand Down

0 comments on commit 90d481e

Please sign in to comment.