On 09/03/2021 19:48, Adrián Gimeno Balaguer wrote:
> I had been passing a pointer of an unrelated type to
> curl_easy_setopt
> (to set CURLOPT_POST), instead of the proper CURL handle. I've just
> removed the call since the POST should be enabled already when
> supplying POST fields (which I do). Apparently I had introduced the
> bug inadvertently since +3 months ago.
>
> But how is it possible that the compiler doesn't complain of that
> misuse? (Even if curl_easy_setop is wrapped by a macro; a CURL handle
> is required in the function call).
>
Looking at curl.h, unless CURL_STRICTER is defined, then
CURL* is just a void*.

Assuming your program is written in C, pointers can
therefore convert implicitly to CURL*.

Glad you got it sorted!

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to