-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 warnings #3095
Fix warnings #3095
Conversation
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.
Thank for the PR. In general looks good except for the -Wsuggest-attribute=format
part which is a bit messy. Considering that this code is going away I suggest not trying to suppress it.
@vitaut |
Yes, |
Only NaN and Inf are not less than Inf and the check for NaN is done before. Solves: .../fmt/include/fmt/format.h:2509:43: warning: comparing floating-point with '==' or '!=' is unsafe [-Wfloat-equal] 2509 | return !detail::isnan(value) && value != inf && value != -inf;
Solves: /fmt/include/fmt/ostream.h:89:18: warning: declaration of 'fbuf' shadows a previous local [-Wshadow] 89 | else if (auto* fbuf = dynamic_cast<__gnu_cxx::stdio_filebuf<char>*>(rdbuf)) | ^~~~ C:/GIT/ok-mimot/libs/3rdParty/fmt/include/fmt/ostream.h:87:13: note: shadowed declaration is here 87 | if (auto* fbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf<char>*>(rdbuf)) | ^~~~
137dc6c
to
a2f9dea
Compare
Is there an ETA on when it's going away? |
Merged, thanks!
it will happen in the next (major) release some time next year. The actual code might be removed earlier in preparation for the release. |
We are hitting this warning in our tests (-Werror). When the code is going away, couldn't we just add the suppression, as it also will go away? I'd rather not change the our submodule to a fork. |
You can suppress the warnings with |
Fix some warnings.