Skip to content

src: fix http2 debug build errors - #16432

Closed
danbev wants to merge 2 commits into
nodejs:masterfrom
danbev:http2_core_inl-debug-build
Closed

src: fix http2 debug build errors#16432
danbev wants to merge 2 commits into
nodejs:masterfrom
danbev:http2_core_inl-debug-build

Conversation

@danbev

Copy link
Copy Markdown
Contributor

Currently building with debug enabled produces the following errors:

In file included from ../src/node_http2.h:6:../src/node_http2_core-inl.h:465:18: error: expected ';' after do/whilestatement CHECK_GT(id, 0) ^ ;../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier'spec' OnPriority(id, spec.stream_id, spec.weight, spec.exclusive); ^../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier'spec' OnPriority(id, spec.stream_id, spec.weight, spec.exclusive); ^../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier'spec' OnPriority(id, spec.stream_id, spec.weight, spec.exclusive); ^

This commit adds the missing semicolon to fix the above error.

../src/node_http2.cc:92:9: error: reference to non-static memberfunction must be called; did you mean to call it with no arguments? CHECK(object->Has(context, env()->ongetpadding_string()).FromJust()); ^~~~~~../src/util.h:120:20: note: expanded from macro 'CHECK' if (UNLIKELY(!(expr))) {\ ^~~~../src/util.h:107:44: note: expanded from macro 'UNLIKELY'

For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

src

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Oct 24, 2017
@danbevdanbev added the http2 Issues or PRs related to the http2 subsystem. label Oct 24, 2017
Currently building with debug enabled produces the following errors:
In file included from ../src/node_http2.h:6:
../src/node_http2_core-inl.h:465:18: error: expected ';' after do/while
statement
CHECK_GT(id, 0)
^
;
../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
This commit adds the missing semicolon to fix the above error.
../src/node_http2.cc:92:9: error: reference to non-static member
function must be called; did you mean to call
it with no arguments?
CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
^~~~~~
../src/util.h:120:20: note: expanded from macro 'CHECK'
if (UNLIKELY(!(expr))) {
\
^~~~
../src/util.h:107:44: note: expanded from macro 'UNLIKELY'
For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.
@danbev
danbevforce-pushed the http2_core_inl-debug-build branch from 368192d to 06726f2CompareOctober 24, 2017 06:56
@danbevdanbev changed the title src: add missing semicolon to debug statementsrc: fix http2 debug build errorsOct 24, 2017
Comment threadsrc/node_http2.cc Outdated

#if defined(DEBUG) && DEBUG
CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
// CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think
CHECK(object->Has(context, env()->ongetpadding_string().FromJust()));
is the right one. Without which, the whole expression was evaluated to be a value type, while we expect to have a boolean type for the CHECK.

@apapirovskiapapirovski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the comment addressed

Comment threadsrc/node_http2.cc Outdated

#if defined(DEBUG) && DEBUG
CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
// CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be

CHECK(object()->Has(context,env()->ongetpadding_string()).FromJust());

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I was missing where object was coming from. Will update shortly.

@apapirovski

apapirovski commented Oct 24, 2017

Copy link
Copy Markdown
Contributor

I would like to see this land in less than 48 hours, pending a CI run, if no one objects. Feel free to use the 'confused' emoji to let me know otherwise :)

@addaleax

Copy link
Copy Markdown
Member

Landed in a9f5084, thanks!

addaleax pushed a commit that referenced this pull request Oct 24, 2017
Currently building with debug enabled produces the following errors:
In file included from ../src/node_http2.h:6:
../src/node_http2_core-inl.h:465:18: error: expected ';' after do/while
statement
CHECK_GT(id, 0)
^
;
../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
This commit adds the missing semicolon to fix the above error.
../src/node_http2.cc:92:9: error: reference to non-static member
function must be called; did you mean to call
it with no arguments?
CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
^~~~~~
../src/util.h:120:20: note: expanded from macro 'CHECK'
if (UNLIKELY(!(expr))) {
\
^~~~
../src/util.h:107:44: note: expanded from macro 'UNLIKELY'
For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.
PR-URL: #16432
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@apapirovskiapapirovski mentioned this pull request Oct 26, 2017
2 tasks
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 26, 2017
Currently building with debug enabled produces the following errors:
In file included from ../src/node_http2.h:6:
../src/node_http2_core-inl.h:465:18: error: expected ';' after do/while
statement
CHECK_GT(id, 0)
^
;
../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
This commit adds the missing semicolon to fix the above error.
../src/node_http2.cc:92:9: error: reference to non-static member
function must be called; did you mean to call
it with no arguments?
CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
^~~~~~
../src/util.h:120:20: note: expanded from macro 'CHECK'
if (UNLIKELY(!(expr))) {
\
^~~~
../src/util.h:107:44: note: expanded from macro 'UNLIKELY'
For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.
PR-URL: nodejs/node#16432
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request Oct 30, 2017
Currently building with debug enabled produces the following errors:
In file included from ../src/node_http2.h:6:
../src/node_http2_core-inl.h:465:18: error: expected ';' after do/while
statement
CHECK_GT(id, 0)
^
;
../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
This commit adds the missing semicolon to fix the above error.
../src/node_http2.cc:92:9: error: reference to non-static member
function must be called; did you mean to call
it with no arguments?
CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
^~~~~~
../src/util.h:120:20: note: expanded from macro 'CHECK'
if (UNLIKELY(!(expr))) {
\
^~~~
../src/util.h:107:44: note: expanded from macro 'UNLIKELY'
For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.
PR-URL: nodejs#16432
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@Fishrock123Fishrock123 mentioned this pull request Oct 30, 2017
@gibfahngibfahn mentioned this pull request Oct 31, 2017
@danbev
danbev deleted the http2_core_inl-debug-build branch November 16, 2017 08:39
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
Currently building with debug enabled produces the following errors:
In file included from ../src/node_http2.h:6:
../src/node_http2_core-inl.h:465:18: error: expected ';' after do/while
statement
CHECK_GT(id, 0)
^
;
../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier
'spec'
OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
^
This commit adds the missing semicolon to fix the above error.
../src/node_http2.cc:92:9: error: reference to non-static member
function must be called; did you mean to call
it with no arguments?
CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
^~~~~~
../src/util.h:120:20: note: expanded from macro 'CHECK'
if (UNLIKELY(!(expr))) {
\
^~~~
../src/util.h:107:44: note: expanded from macro 'UNLIKELY'
For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.
PR-URL: nodejs/node#16432
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.http2Issues or PRs related to the http2 subsystem.lib / srcIssues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@danbev@apapirovski@addaleax@bnoordhuis@jasnell@cjihrig@tniessen@gireeshpunathil@MylesBorins@nodejs-github-bot