From f00ba6b142771a3dff768b48f2a68cc2e56e5b66 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 24 Oct 2017 08:34:02 +0200 Subject: [PATCH] src: fix http2 debug build errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/nodejs/node/pull/16432 Reviewed-By: Anatoli Papirovski Reviewed-By: Anna Henningsen Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen --- src/node_http2.cc | 2 +- src/node_http2_core-inl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_http2.cc b/src/node_http2.cc index 089423334366c2..e10c71e9a84e1e 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -89,7 +89,7 @@ ssize_t Http2Session::OnCallbackPadding(size_t frameLen, Context::Scope context_scope(context); #if defined(DEBUG) && DEBUG - CHECK(object->Has(context, env()->ongetpadding_string()).FromJust()); + CHECK(object()->Has(context, env()->ongetpadding_string()).FromJust()); #endif AliasedBuffer& buffer = diff --git a/src/node_http2_core-inl.h b/src/node_http2_core-inl.h index 5bfe1dc19a949c..9735e565b2f0e2 100644 --- a/src/node_http2_core-inl.h +++ b/src/node_http2_core-inl.h @@ -462,7 +462,7 @@ inline void Nghttp2Session::HandlePriorityFrame(const nghttp2_frame* frame) { // good here #if defined(DEBUG) && DEBUG - CHECK_GT(id, 0) + CHECK_GT(id, 0); #endif nghttp2_priority_spec spec = priority_frame.pri_spec;