On 09/10/2025 16.08, Richard W.M. Jones wrote:
curl_easy_setopt takes a variable argument that depends on what
CURLOPT you are setting.  Some require a long constant.  Passing a
plain int constant is potentially wrong on some platforms.

With warnings enabled, multiple warnings like this were printed:

../block/curl.c: In function ‘curl_init_state’:
../block/curl.c:474:13: warning: call to ‘_curl_easy_setopt_err_long’ declared 
with attribute warning: curl_easy_setopt expects a long argument 
[-Wattribute-warning]
   474 |             curl_easy_setopt(state->curl, CURLOPT_AUTOREFERER, 1) ||
       |             ^

Signed-off-by: Richard W.M. Jones <[email protected]>
Signed-off-by: Chenxi Mao <[email protected]>
Reviewed-by: Daniel P. Berrangé <[email protected]>
---
  block/curl.c               | 10 +++++-----
  contrib/elf2dmp/download.c |  4 ++--
  2 files changed, 7 insertions(+), 7 deletions(-)

Thanks, this seems to fix the broken freebsd job in our gitlab CI!

Reviewed-by: Thomas Huth <[email protected]>


Reply via email to