src: fix compiler warnings in node_http2.cc#33014
Closed
danbev wants to merge 1 commit intonodejs:masterfrom
Closed
src: fix compiler warnings in node_http2.cc#33014danbev wants to merge 1 commit intonodejs:masterfrom
danbev wants to merge 1 commit intonodejs:masterfrom
Conversation
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.
himself65
approved these changes
Apr 23, 2020
Collaborator
richardlau
approved these changes
Apr 23, 2020
juanarbol
approved these changes
Apr 23, 2020
cjihrig
approved these changes
Apr 23, 2020
jasnell
approved these changes
Apr 23, 2020
Member
jasnell
left a comment
There was a problem hiding this comment.
Ugh, thank you... so annoying that the Windows build does not give the same warnings. It would definitely be good to get that PR elevating warnings into failures in CI landed
Member
|
Fast track? |
sam-github
approved these changes
Apr 23, 2020
Collaborator
Member
|
CI hung on arm-fanned tho no errors were reported. running again |
Collaborator
Contributor
Author
Sorry, I dropped the ball on this one. I've updated #32685 now and hopefully we can get it landed. We also need to add this to the CI jobs before it takes effect on all PRs. |
Collaborator
2 tasks
Collaborator
jasnell
pushed a commit
that referenced
this pull request
Apr 24, 2020
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: #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>
Member
|
Landed in 654c0ac |
BethGriggs
pushed a commit
that referenced
this pull request
Apr 27, 2020
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: #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>
Merged
Member
|
This lands cleanly on v13.x but it's required and should not land therefore or another commit should land first. It should probably not be backported at all? |
BethGriggs
pushed a commit
that referenced
this pull request
Apr 28, 2020
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: #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>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the following compiler warnings are generated:
This commit removes these unused variables.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes