From 3b8d70d924bee5126b1583fc3f1c4a8c70bce53b Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 6 Mar 2020 11:15:43 -0500 Subject: [PATCH 1/2] src: fix -Winconsistent-missing-override warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../src/node_http_common.h:497:8: warning: 'MemoryInfo' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] void MemoryInfo(MemoryTracker* tracker) const { PR-URL: https://github.com/nodejs/node/pull/32126 Refs: https://github.com/nodejs/node/pull/32069 Reviewed-By: Denys Otrishko Reviewed-By: Michael Dawson Reviewed-By: David Carlier Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: Anna Henningsen Reviewed-By: Tobias Nießen --- src/node_http_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_http_common.h b/src/node_http_common.h index d43418ba6f217c..41b5f419d94338 100644 --- a/src/node_http_common.h +++ b/src/node_http_common.h @@ -494,7 +494,7 @@ class NgHeader : public MemoryRetainer { inline std::string value() const; inline size_t length() const; - void MemoryInfo(MemoryTracker* tracker) const { + void MemoryInfo(MemoryTracker* tracker) const override { tracker->TrackField("name", name_); tracker->TrackField("value", value_); } From 7bb4f95c1cdf860082a27e2592488c2ba6734c20 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 6 Mar 2020 11:21:00 -0500 Subject: [PATCH 2/2] src: fix -Wreorder compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../src/node_http_common-inl.h:126:7: warning: field 'token_' will be initialized after field 'name_' [-Wreorder] : token_(other.token_), PR-URL: https://github.com/nodejs/node/pull/32126 Refs: https://github.com/nodejs/node/pull/32069 Reviewed-By: Denys Otrishko Reviewed-By: Michael Dawson Reviewed-By: David Carlier Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: Anna Henningsen Reviewed-By: Tobias Nießen --- src/node_http_common-inl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_http_common-inl.h b/src/node_http_common-inl.h index 1bc7b46d63a827..d63cdf79a4b468 100644 --- a/src/node_http_common-inl.h +++ b/src/node_http_common-inl.h @@ -123,9 +123,9 @@ NgHeader::NgHeader( template NgHeader::NgHeader(NgHeader&& other) noexcept - : token_(other.token_), - name_(std::move(other.name_)), + : name_(std::move(other.name_)), value_(std::move(other.value_)), + token_(other.token_), flags_(other.flags_) { other.token_ = -1; other.flags_ = 0;