diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2020-04-23 07:15:25 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-04-24 21:06:58 +0300 |
commit | 654c0ace7b44da722b313bae2e7cb0ae6a9341a4 (patch) | |
tree | 1a629962d300664211cd49575b62119326046f3b /src/node_http2.cc | |
parent | 802edb1d6a4c752c27e040a3a24859e631435110 (diff) |
src: fix compiler warnings in node_http2.cc
Currently, the following compiler warnings are generated:
../src/node_http2.cc: In static member function
‘static int node::http2::Http2Session::OnStreamClose(nghttp2_session*,
int32_t, uint32_t, void*)’:
../src/node_http2.cc:994:16: warning:
variable ‘def’ set but not used [-Wunused-but-set-variable]
994 | Local<Value> def = v8::False(env->isolate());
| ^~~
../src/node_http2.cc: In static member function
‘static void node::http2::Http2Session::Ping(
const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/node_http2.cc:2755:16: warning:
unused variable ‘env’ [-Wunused-variable]
2755 | Environment* env = Environment::GetCurrent(args);
| ^~~
../src/node_http2.cc: In static member function
‘static void node::http2::Http2Session::Settings(
const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/node_http2.cc:2774:16: warning:
unused variable ‘env’ [-Wunused-variable]
2774 | Environment* env = Environment::GetCurrent(args);
| ^~~
This commit removes these unused variables.
PR-URL: https://github.com/nodejs/node/pull/33014
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r-- | src/node_http2.cc | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc index 385a2352040..189f1d50a29 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -991,7 +991,6 @@ int Http2Session::OnStreamClose(nghttp2_session* handle, MaybeLocal<Value> answer = stream->MakeCallback(env->http2session_on_stream_close_function(), 1, &arg); - Local<Value> def = v8::False(env->isolate()); if (answer.IsEmpty() || answer.ToLocalChecked()->IsFalse()) { // Skip to destroy stream->Destroy(); @@ -2752,7 +2751,6 @@ void Http2Session::Origin(const FunctionCallbackInfo<Value>& args) { // Submits a PING frame to be sent to the connected peer. void Http2Session::Ping(const FunctionCallbackInfo<Value>& args) { - Environment* env = Environment::GetCurrent(args); Http2Session* session; ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder()); @@ -2771,7 +2769,6 @@ void Http2Session::Ping(const FunctionCallbackInfo<Value>& args) { // Submits a SETTINGS frame for the Http2Session void Http2Session::Settings(const FunctionCallbackInfo<Value>& args) { - Environment* env = Environment::GetCurrent(args); Http2Session* session; ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder()); CHECK(args[0]->IsFunction()); |