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

small changes to reduce clang-9 warnings #1808

Merged
merged 2 commits into from
Aug 13, 2020
Merged

Conversation

medithe
Copy link
Contributor

@medithe medithe commented Aug 8, 2020

No description provided.

Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

using iterator = remove_reference_t<decltype(reserve(out, 0))>;
using out_iterator = remove_reference_t<decltype(reserve(out, 0))>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed completely.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is addressed with 412a658.

@@ -1593,7 +1593,7 @@ template <typename OutputIt, typename Char, typename UInt> struct int_writer {
format_decimal(digits, abs_value, num_digits);
basic_memory_buffer<Char> buffer;
size += prefix_size;
buffer.resize(size);
buffer.resize(to_unsigned(size));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest storing to_unsigned(size) in a variable (usize?) to avoid copy-pasta.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is adressed with e6159ed.

@medithe medithe force-pushed the master branch 2 times, most recently from d44ba72 to 3b75c41 Compare August 12, 2020 16:01
…e-declaration (prevents shadow-waringing in clang)
…signed to prevent 'implicit conversion changes signedness'-warnings in clang.
@vitaut vitaut merged commit 1c8bb54 into fmtlib:master Aug 13, 2020
facebook-github-bot pushed a commit to facebookarchive/profilo that referenced this pull request Aug 18, 2020
Summary: Add PRs [#1808](fmtlib/fmt#1808), [#1812](fmtlib/fmt#1812), [#1816](fmtlib/fmt#1816), [#1818](fmtlib/fmt#1818) to improve cross-platform compatibility.

Reviewed By: stepancheg

Differential Revision: D23154350

fbshipit-source-id: 42f3781f70d376e1da2bcf34cb89a56f431371e4
EduardoCostaom pushed a commit to EduardoCostaom/profilo that referenced this pull request Nov 2, 2022
Summary: Add PRs [#1808](fmtlib/fmt#1808), [#1812](fmtlib/fmt#1812), [#1816](fmtlib/fmt#1816), [#1818](fmtlib/fmt#1818) to improve cross-platform compatibility.

Reviewed By: stepancheg

Differential Revision: D23154350

fbshipit-source-id: 42f3781f70d376e1da2bcf34cb89a56f431371e4
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.

3 participants