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

endpoint.hpp throws a compiler warning due to const bool return #4629

Closed
nehalkpatel opened this issue Nov 19, 2023 · 0 comments · Fixed by #4630
Closed

endpoint.hpp throws a compiler warning due to const bool return #4629

nehalkpatel opened this issue Nov 19, 2023 · 0 comments · Fixed by #4630

Comments

@nehalkpatel
Copy link
Contributor

nehalkpatel commented Nov 19, 2023

https://github.com/zeromq/libzmq/blame/814dab58a4eea3202d28d7db4fa24c27287c5378/src/endpoint.hpp#L32

Since bool is returned by value, the const is redundant and will throw an ignored-qualifier warning with clang:

[build] build/host/_deps/zeromq-src/src/endpoint.hpp:32:5: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
[build]    32 |     const bool clash () const { return local == remote; }
[build]       |     ^~~~~
@bluca bluca linked a pull request Nov 19, 2023 that will close this issue
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 a pull request may close this issue.

1 participant