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

Warning about unannotated fallthrough in switch-case. #226

Open
jonesmz opened this issue Dec 30, 2019 · 3 comments
Open

Warning about unannotated fallthrough in switch-case. #226

jonesmz opened this issue Dec 30, 2019 · 3 comments
Labels
warning Its all about compiler warnings which is not covered by the CI

Comments

@jonesmz
Copy link
Contributor

jonesmz commented Dec 30, 2019

I get this warning on both Clang++8, and Clang++9.

Issue also reported upstream to Boost: boostorg/asio#310

I'm not sure how to fix this.

In file included from /home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/connection_info.h:5:
In file included from /home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/impl/async_connect.h:7:
In file included from /home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/impl/request_oid_map.h:3:
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/impl/async_request.h:209:25: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
yield get_connection(ctx_).async_wait_read(std::move(*this));
^
/usr/include/boost/asio/yield.hpp:18:16: note: expanded from macro 'yield'
# define yield BOOST_ASIO_CORO_YIELD
^
/usr/include/boost/asio/coroutine.hpp:326:32: note: expanded from macro 'BOOST_ASIO_CORO_YIELD'
# define BOOST_ASIO_CORO_YIELD BOOST_ASIO_CORO_YIELD_IMPL(LINE)
^
/usr/include/boost/asio/coroutine.hpp:300:7: note: expanded from macro 'BOOST_ASIO_CORO_YIELD_IMPL'
case (n): ;
^

@thed636
Copy link
Collaborator

thed636 commented Jan 10, 2020

Well, IMO the only solution, for now, is use pragma to suppress such warning there the macro is used.

@jonesmz
Copy link
Contributor Author

jonesmz commented Jan 11, 2020

Is that something you would accept as a PR?

For now I've had to disable the -Wfallthrough warning. Which I didn't want to do, but having the warning free build was better than keeping it active.

@thed636
Copy link
Collaborator

thed636 commented Jan 11, 2020

Is that something you would accept as a PR?

Yep, sure. Just take care of the previous Clang version and GCC that are used for CI.

@thed636 thed636 added the warning Its all about compiler warnings which is not covered by the CI label Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
warning Its all about compiler warnings which is not covered by the CI
Projects
None yet
Development

No branches or pull requests

2 participants