Skip to content

Commit d6805c1

Browse files
danbevMylesBorins
authored andcommitted
src: add override to ThreadPool methods in zlib
Currently the following compiler warnings are generated: ../src/node_zlib.cc:222:8: warning: 'DoThreadPoolWork' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] void DoThreadPoolWork() { ^ ../src/node_internals.h:509:16: note: overridden virtual function is here virtual void DoThreadPoolWork() = 0; ^ ../src/node_zlib.cc:357:8: warning: 'AfterThreadPoolWork' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] void AfterThreadPoolWork(int status) { ^ ../src/node_internals.h:510:16: note: overridden virtual function is here virtual void AfterThreadPoolWork(int status) = 0; ^ This commit adds the override specifier to the methods to silence the warnings. PR-URL: #20769 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 9b43af3 commit d6805c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_zlib.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class ZCtx : public AsyncWrap, public ThreadPoolWork {
219219
// This function may be called multiple times on the uv_work pool
220220
// for a single write() call, until all of the input bytes have
221221
// been consumed.
222-
void DoThreadPoolWork() {
222+
void DoThreadPoolWork() override {
223223
const Bytef* next_expected_header_byte = nullptr;
224224

225225
// If the avail_out is left at 0, then it means that it ran out
@@ -353,7 +353,7 @@ class ZCtx : public AsyncWrap, public ThreadPoolWork {
353353

354354

355355
// v8 land!
356-
void AfterThreadPoolWork(int status) {
356+
void AfterThreadPoolWork(int status) override {
357357
write_in_progress_ = false;
358358

359359
if (status == UV_ECANCELED) {

0 commit comments

Comments
 (0)