curl_threads: silence bad-function-cast warning #2908
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
As
uintptr_t
andHANDLE
are always the same size, this warning isharmless. Just silence it using an intermediate uintptr_t variable.
This patch silences this warning from the MinGW autobuilds:
https://curl.haxx.se/dev/log.cgi?id=20180823035209-27962#prob3
It will probably break ancient versions of Visual C++ (6 and maybe .NET/2002, if they're not already broken) as they lack
uintptr_t
and_beginthreadex
returnsunsigned long
for them, if I remember correctly. But I can only guess because we have no testing for them (they won't even install without hacks on modern Windows versions) and my computer refuses to search through 30,000 pages of PDF documentation, which is still downloadable here:https://docs.microsoft.com/en-us/previous-versions/visualstudio/
Any opinion of how to handle this? Get this in as-is and let possible users of these compilers complain (hopefully there are none) or guess on a fix?