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

Fix vs2017 warning fmt::v5::localtime 'not all control paths return a value' #886

Conversation

stevenhoving
Copy link
Contributor

The fmt::internal::do_throw workaround for 'bogus MSVC warning about unreachable code' has a unwanted side effect when using time formatting. It is always my goal to have no warning in my code, but when I building my project (CamStudio fork ) with warning level 4. I get a nice warning C4715: 'fmt::v5::localtime': not all control paths return a value warning. This PR should resolve this issue, although i'm not sure about the fix itself. It feels like adding additional noise.
One thing I also tried was to remove the fmt::internal::do_throw workaround completely and fix the warnings about unreachable code by removing the unreachable code. But you would have done that already if that would have fixed it.

@vitaut vitaut merged commit 674999c into fmtlib:master Sep 30, 2018
@vitaut
Copy link
Contributor

vitaut commented Sep 30, 2018

LGTM, thanks!

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.

2 participants