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 <curl-library_at_lists.haxx.se>
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/cc6vSBoL.mk:2: /tmp/ccJRrCLn.ltrans0.ltrans.o] Error 1

at:

https://download.copr.fedorainfracloud.org/results/ghenry/SentryPeer/fedora-35-aarch64/03196835-sentrypeer/builder-live.log.gz
https://copr.fedorainfracloud.org/coprs/ghenry/SentryPeer/

yet it's set like the example:

https://curl.se/libcurl/c/getinmemory.html
https://github.com/SentryPeer/SentryPeer/blob/main/tests/unit_tests/test_http_api.c#L60

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.
https://sentrypeer.org
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-01-18