Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: CURLOPT_WRITEFUNCTION issues - warning: curl_easy_setopt expects a curl_write_callback argument
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Timothe Litt <litt_at_acm.org>
Date: Fri, 21 Jan 2022 06:06:46 -0500
It enables link-time optimizations. The compiler/linker can see further
into to the source, and detect errors not seen at the module level.
It's saying that your callback routine must be declared/typedefed as a
"curl_write_callback".
Timothe Litt
ACM Distinguished Engineer
--------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed.
On 21-Jan-22 05:11, Gavin Henry via curl-library wrote:
>> -O2 -flto=auto -ffat-lto-objects
>> -fexceptions -g -grecord-gcc-switches -pipe -Wall
>> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
>> -Wp,-D_GLIBCXX_ASSERTIONS
>> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
>> -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
>> -m64 -mtune=generic -fasynchronous-unwind-tables
>> -fstack-clash-protection -fcf-protection -Wl,-z,relro -Wl,--as-needed
>> -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
>> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
> So RH is adding about, but it's actually only this that is triggering the error:
>
> -flto=auto
>
> Going to read up on what that does which causes:
>
> error: call to ‘_curl_easy_setopt_err_write_callback’ declared with
> attribute warning: curl_easy_setopt expects a curl_write_callback
> argument for this option [-Werror=attribute-warning]
> 60 | curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
> | ^
> lto1: all warnings being treated as errors
>
>
> Thanks.
>
>
Received on 2022-01-21
Date: Fri, 21 Jan 2022 06:06:46 -0500
It enables link-time optimizations. The compiler/linker can see further
into to the source, and detect errors not seen at the module level.
It's saying that your callback routine must be declared/typedefed as a
"curl_write_callback".
Timothe Litt
ACM Distinguished Engineer
--------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed.
On 21-Jan-22 05:11, Gavin Henry via curl-library wrote:
>> -O2 -flto=auto -ffat-lto-objects
>> -fexceptions -g -grecord-gcc-switches -pipe -Wall
>> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
>> -Wp,-D_GLIBCXX_ASSERTIONS
>> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
>> -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
>> -m64 -mtune=generic -fasynchronous-unwind-tables
>> -fstack-clash-protection -fcf-protection -Wl,-z,relro -Wl,--as-needed
>> -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
>> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
> So RH is adding about, but it's actually only this that is triggering the error:
>
> -flto=auto
>
> Going to read up on what that does which causes:
>
> error: call to ‘_curl_easy_setopt_err_write_callback’ declared with
> attribute warning: curl_easy_setopt expects a curl_write_callback
> argument for this option [-Werror=attribute-warning]
> 60 | curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
> | ^
> lto1: all warnings being treated as errors
>
>
> Thanks.
>
>
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
- application/pgp-signature attachment: OpenPGP digital signature