curl / Mailing Lists / curl-library / Single Mail
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.

CURLOPT_WRITEFUNCTION issues - warning: curl_easy_setopt expects a curl_write_callback argument

From: Gavin Henry via curl-library <>
Date: Tue, 18 Jan 2022 21:05:26 +0000

Hi all,

Whilst building an RPM for Fedora using copr (and on my local Fedora
35), this error is generated:

In function 'test_http_api_health_check_version',
    inlined from 'test_http_api_get' at tests/unit_tests/test_http_api.c:115:2:
tests/unit_tests/test_http_api.c:60:9: 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
make[2]: *** [/tmp/ /tmp/ccJRrCLn.ltrans0.ltrans.o] Error 1


yet it's set like the example:

Anyone seen this before? Builds fine from source and on Debian and
Ubuntu etc. I wonder if this is Red Hats build options for RPMs....

Kind Regards,
Gavin Henry.
Received on 2022-01-18