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

Visual Studio 2022: fmt/format-inl.h(1145,60): warning C4310: cast truncates constant value #3287

Closed
chronoxor opened this issue Jan 25, 2023 · 2 comments

Comments

@chronoxor
Copy link
Contributor

Visual Studio 2022 generates the following warning in /W4 pedantic mode:

fmt/format-inl.h(1145,60): warning C4310: cast truncates constant value

On the following code fragment:

const uint32_t mod_inv_25 = uint32_t(uint64_t(mod_inv_5) * mod_inv_5);
@vitaut
Copy link
Contributor

vitaut commented Jan 26, 2023

Fixing all possible warnings is a non-goal but a PR to suppress it would be welcome provided that it's not too intrusive.

@vitaut vitaut closed this as completed Jan 26, 2023
@chronoxor
Copy link
Contributor Author

Thanks! Yes, I usually try to fix pedantic warnings by myself and provide a PR in order not to disturb too much.

vitaut pushed a commit that referenced this issue Jan 26, 2023
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

No branches or pull requests

2 participants