Skip to content

Fix C4244 warning in Win32 builds when converting streamoff to size_t - #33

Merged
dwd merged 1 commit into
dwd:masterfrom
umasagarmd:fix/c4244-streamoff-to-size_t
Aug 22, 2026
Merged

Fix C4244 warning in Win32 builds when converting streamoff to size_t#33
dwd merged 1 commit into
dwd:masterfrom
umasagarmd:fix/c4244-streamoff-to-size_t

Conversation

@umasagarmd

@umasagarmd umasagarmd commented Aug 17, 2026

Copy link
Copy Markdown

Fixes MSVC warning C4244 in Win32 builds:

In utils.h, the line:
size_t size = stream.tellg();
causes MSVC warning C4244 ('initializing': conversion from 'std::streamoff' to 'size_t', possible loss of data).

Make the conversion explicit and use auto for type deduction:
auto size = static_cast<size_t>(stream.tellg());

@umasagarmd
umasagarmd force-pushed the fix/c4244-streamoff-to-size_t branch from 2a32f01 to 80a84fc Compare August 17, 2026 21:17
@sonarqubecloud

Copy link
Copy Markdown

@dwd

dwd commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Thank you!

@dwd

dwd commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Failing tests are on me, it's Sonar actions needing effort on my part. I'll deal with it.

@umasagarmd

Copy link
Copy Markdown
Author

Hi @dwd, thanks again for looking into the CI issues. Do you have an estimated timeline for when this PR might be ready to move forward? Thanks!

@dwd
dwd merged commit 8100bac into dwd:master Aug 22, 2026
1 of 2 checks passed
@dwd

dwd commented Aug 22, 2026

Copy link
Copy Markdown
Owner

I've merged it, will need to fix the pipeline later.

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