Skip to content

Commit

Permalink
src: remove unused variables
Browse files Browse the repository at this point in the history
Currently the following compiler warnings are generated:

../src/node_process.cc:799:16:
warning: unused variable 'ary' [-Wunused-variable]
  Local<Array> ary = Array::New(args.GetIsolate());
               ^
1 warning generated.

../src/node_http2.cc:1294:16:
warning: unused variable 'holder' [-Wunused-variable]
  Local<Array> holder = Array::New(isolate);
               ^
1 warning generated.

This commit removes these unused variables.

PR-URL: #24355
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
danbev authored and rvagg committed Nov 28, 2018
1 parent e82f67d commit 806570d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,6 @@ void Http2Session::HandleHeadersFrame(const nghttp2_frame* frame) {
Local<String> name_str;
Local<String> value_str;

Local<Array> holder = Array::New(isolate);
// The headers are passed in above as a queue of nghttp2_header structs.
// The following converts that into a JS array with the structure:
// [name1, value1, name2, value2, name3, value3, name3, value4] and so on.
Expand Down
1 change: 0 additions & 1 deletion src/node_process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,6 @@ void GetParentProcessId(Local<Name> property,
void GetActiveRequests(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);

Local<Array> ary = Array::New(args.GetIsolate());
std::vector<Local<Value>> request_v;
for (auto w : *env->req_wrap_queue()) {
if (w->persistent().IsEmpty())
Expand Down

0 comments on commit 806570d

Please sign in to comment.