-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: add override to ThreadPool methods in zlib #20769
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Not sure if my compiler just doesn’t display these or I’m overlooking them 🙃
@addaleax You use gcc < 5? |
7.2.0, actually. It does provide warnings when used with |
Would it be alright to fast-track this issue? |
Landed in 0419adc. |
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 <joyeec9h3@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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 <joyeec9h3@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Currently the following compiler warnings are generated:
This commit adds the override specifier to the methods to silence the
warnings.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes