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

Fix casting uint64_t to size_t for 32-bit builds #1993

Closed
wants to merge 1 commit into from

Conversation

pps83
Copy link
Contributor

@pps83 pps83 commented Nov 29, 2024

This fixes the following warning:

D:\cpp-httplib\httplib.h(8002,61): warning C4244: 'argument': conversion from 'uint64_t' to 'const _Ty', possible loss of data
D:\cpp-httplib\httplib.h(8002,61): warning C4244:         with
D:\cpp-httplib\httplib.h(8002,61): warning C4244:         [
D:\cpp-httplib\httplib.h(8002,61): warning C4244:             _Ty=size_t
D:\cpp-httplib\httplib.h(8002,61): warning C4244:         ]
(compiling source file '../src/test/HttpRequestTest.cpp')

This fixes the following warning:
```
D:\cpp-httplib\httplib.h(8002,61): warning C4244: 'argument': conversion from 'uint64_t' to 'const _Ty', possible loss of data
D:\cpp-httplib\httplib.h(8002,61): warning C4244:         with
D:\cpp-httplib\httplib.h(8002,61): warning C4244:         [
D:\cpp-httplib\httplib.h(8002,61): warning C4244:             _Ty=size_t
D:\cpp-httplib\httplib.h(8002,61): warning C4244:         ]
(compiling source file '../src/test/HttpRequestTest.cpp')
```
@yhirose yhirose closed this in 457fc43 Nov 30, 2024
@yhirose
Copy link
Owner

yhirose commented Nov 30, 2024

@pps83 thanks for the pull request! I fixed this issue in a slightly different way. Thanks!

@pps83 pps83 deleted the master-fixcast branch December 2, 2024 14:22
@pps83
Copy link
Contributor Author

pps83 commented Dec 2, 2024

@pps83 thanks for the pull request! I fixed this issue in a slightly different way. Thanks!

This did not fix the problem though. This one is needed: #1999

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