On Wed, Oct 01, 2025 at 01:40:47PM +0100, 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.
In practice for QEMU I think this is all harmless, since we only target GCC + CLang on a selection of modern platforms, so integer promotion should work fine for int -> long. None the less, we need to squash the warnings and don't want to turn off -Wattribute-warning entirely, so this makes sense. > > 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]> > --- > block/curl.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Daniel P. Berrangé <[email protected]> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
