Skip to content
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

Disable GCC suggest-override warnings for proxy clients #40

Merged
merged 1 commit into from Dec 8, 2020

Conversation

ryanofsky
Copy link
Collaborator

@ryanofsky ryanofsky commented Dec 8, 2020

Proxy client methods are usually virtual, but in some use cases (testing, layering) they don't have to have to be and there is no reason to make generated client code try to detect or specify this. Disable the warning instead.

Warnings look like https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

./ipc/capnp/init.capnp.proxy.h:62:25: error: ‘virtual mp::FunctionTraits<std::unique_ptr<interfaces::Echo> (interfaces::Init::* const)()>::Result mp::ProxyClient<ipc::capnp::messages::Init>::makeEcho()’ can be marked override [-Werror=suggest-override]
   62 |     typename M1::Result makeEcho();
      |                         ^~~~~~~~
cc1plus: some warnings being treated as errors

Proxy client methods are usually virtual, but in some use cases (testing,
layering) they don't have to have to be and there is no reason to make
generated client code try to detect or specify this. Disable the warning
instead.

Warnings look like https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

./ipc/capnp/init.capnp.proxy.h:62:25: error: ‘virtual mp::FunctionTraits<std::unique_ptr<interfaces::Echo> (interfaces::Init::* const)()>::Result mp::ProxyClient<ipc::capnp::messages::Init>::makeEcho()’ can be marked override [-Werror=suggest-override]
   62 |     typename M1::Result makeEcho();
      |                         ^~~~~~~~
cc1plus: some warnings being treated as errors
@ryanofsky ryanofsky merged commit 4dcd807 into chaincodelabs:master Dec 8, 2020
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Dec 8, 2020
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown bitcoin#35
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests bitcoin#37
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support bitcoin#38
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Dec 11, 2020
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown bitcoin#35
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests bitcoin#37
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support bitcoin#38
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Dec 11, 2020
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Dec 18, 2020
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Dec 18, 2020
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jan 28, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
chaincodelabs/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
chaincodelabs/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jan 28, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 4, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
chaincodelabs/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
chaincodelabs/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 4, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
chaincodelabs/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
chaincodelabs/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 4, 2021
Update libmultiprocess library

Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
chaincodelabs/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
chaincodelabs/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 17, 2021
Update libmultiprocess library

Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
chaincodelabs/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
chaincodelabs/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 17, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
chaincodelabs/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
chaincodelabs/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 17, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
chaincodelabs/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
chaincodelabs/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 30, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
chaincodelabs/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
chaincodelabs/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 30, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
chaincodelabs/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
chaincodelabs/libmultiprocess#43 Drop hardcoded #include lines in generated files
ariard pushed a commit to ariard/bitcoin that referenced this pull request Apr 6, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
chaincodelabs/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
chaincodelabs/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 23, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
chaincodelabs/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
chaincodelabs/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 23, 2021
Fix "Disable GCC suggest-override warnings for proxy clients" chaincodelabs/libmultiprocess#40 is needed to prevent cirrus GCC failure https://cirrus-ci.com/task/6000489311502336?command=ci#L4294

This also includes other recent changes

chaincodelabs/libmultiprocess#35 Fix README.md markdown
chaincodelabs/libmultiprocess#37 Add "make check" target to build and run tests
chaincodelabs/libmultiprocess#38 Add "extends" inherited method support
chaincodelabs/libmultiprocess#41 Avoid depending on argument default constructors
chaincodelabs/libmultiprocess#42 Support attaching custom cleanup functions to proxy client and server classes
chaincodelabs/libmultiprocess#43 Drop hardcoded #include lines in generated files
ryanofsky added a commit to ryanofsky/libmultiprocess that referenced this pull request Dec 22, 2021
Warnings look like "warning: 'initError' overrides a member function but
is not marked 'override' [-Wsuggest-override]"

Warnings were originally reported by Sjors Provoost <sjors@sprovoost.nl>
and are tracked in
chaincodelabs#61

The same warnings were previously disabled for GCC in
05f9817
chaincodelabs#40 and that change
is extended here to apply to clang. The methods triggering the warnings
are not virtual in all cases and should not have the override keyword.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant