Re: [PATCH 0/3] silencing warnings with curl 8.14
- From
Ramsay Jones <ramsay@ramsayjones.plus.com>
- Date
- Jun 4, 2025, 22:03 UTC
- Message-ID
- <769e85c6-c7f7-4732-881a-5765c6ca2410@ramsayjones.plus.com>
- In-Reply-To
- <20250604205505.GA1510724@coredump.intra.peff.net>
On 04/06/2025 21:55, Jeff King wrote:
Show 6 quoted lines
> The new version of curl (which hit Debian unstable a few days ago) > causes a bunch of compiler warnings because we are passing regular ints > to curl_easy_setopt() instead of longs. Passing longs has always been > what you're supposed to do, but the new version is better about > generating warnings with gcc (I think the type-check has been there for > a long time, but I gather it was broken and recently fixed).
Yep, I updated cygwin the other night and curl had been updated, so I saw exactly the same ...
Show 7 quoted lines
> > I split this into three patches since the solutions vary slightly (well, > the last two are the same, but my pontificating on the solution varies). > > [1/3]: curl: fix integer constant typechecks with curl_easy_setopt() > [2/3]: curl: fix integer variable typechecks with curl_easy_setopt() > [3/3]: curl: fix symbolic constant typechecks with curl_easy_setopt()
.. and came up with the same (single) patch, which I was going to split into three! :)
However, I also looked into what a patch to curl would look like to change the constants in patch #3 to long constants. Until I read your commit message, I didn't think there would be much of a problem ... :)
Thanks.
ATB, Ramsay Jones