Skip to content

Conversation

@coryan
Copy link
Contributor

@coryan coryan commented May 6, 2023

On Wndows, size_t is 64-bits, and int is 32-bits. That makes conversions from size_t to int potentially lossy, and they generate warnings. In this case an int variable was assigned to size_t and then passed to functions consuming int. Seems simpler to use auto and avoid these problems altogether.

On Wndows, `size_t` is 64-bits, and `int` is 32-bits. That makes
conversions from `size_t` to `int` potentially lossy, and they generate
warnings.  In this case an `int` variable was assigned to `size_t` and
then passed to functions consuming `int`. Seems simpler to use `auto`
and avoid these problems altogether.
@coryan coryan requested a review from a team as a code owner May 6, 2023 22:00
@coryan coryan requested review from ericsalo and removed request for a team May 6, 2023 22:00
@fowles fowles added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label May 7, 2023
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label May 7, 2023
@copybara-service copybara-service bot closed this in f9108c2 May 7, 2023
@coryan coryan deleted the fix-warnings-repeated-field-warnings-in-msvc branch May 8, 2023 15:18
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