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 curl type warning on Windows with gcc 12.1 #1443

Merged
merged 1 commit into from
May 31, 2022

Conversation

daviesrob
Copy link
Member

curl_easy_setopt(handle, CURLOPT_POSTFIELDSIZE, val) takes a long, but was being passed a size_t. This works on Linux where they're the same size for both 64 and 32-bit platforms, but not on 64-bit Windows which has 32-bit longs and 64-bit size_t. We used to get away with it, but gcc 12.1 complains.

Casting the value to long should be fine. The POST data is for the completion message which should not get that big due to the limit of 10000 parts when uploading data.

curl_easy_setopt(handle, CURLOPT_POSTFIELDSIZE, val) takes a long,
but was being passed a size_t.  This works on Linux where they're
the same size for both 64 and 32-bit platforms, but not on 64-bit
Windows which has 32-bit longs and 64-bit size_t.

Casting the value to long should be fine.  The POST data is for
the completion message which should not get that big due to the limit
of 10000 parts when uploading data.
@jkbonfield jkbonfield merged commit 88ccb03 into samtools:develop May 31, 2022
@daviesrob daviesrob deleted the curl_datatype branch May 31, 2022 11:19
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