mirror of
https://git.freebsd.org/ports.git
synced 2025-06-21 20:50:31 -04:00
ov_http_client.c:1001:47: error: incompatible function pointer types passing 'int (VALUE, VALUE, struct curl_slist **)' (aka 'int (unsigned long, unsigned long, struct curl_slist **)') to parameter of type 'int (*)(VALUE, VALUE, VALUE)' (aka 'int (*)(unsigned long, unsigned long, unsigned long)') [-Wincompatible-function-pointer-types] rb_hash_foreach(request_ptr->headers, ov_http_client_add_header, (VALUE) headers); ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/ruby-3.1/ruby/internal/intern/hash.h:83:40: note: passing argument to parameter 'func' here void rb_hash_foreach(VALUE hash, int (*func)(VALUE key, VALUE val, VALUE arg), VALUE arg); ^ 9 warnings and 1 error generated.
11 lines
532 B
Text
11 lines
532 B
Text
--- ext/ovirtsdk4c/ov_http_client.c.orig 2023-06-24 11:23:37 UTC
|
|
+++ ext/ovirtsdk4c/ov_http_client.c
|
|
@@ -998,7 +998,7 @@ static void ov_http_client_prepare_handle(ov_http_clie
|
|
|
|
/* Set the headers: */
|
|
if (!NIL_P(request_ptr->headers)) {
|
|
- rb_hash_foreach(request_ptr->headers, ov_http_client_add_header, (VALUE) headers);
|
|
+ rb_hash_foreach(request_ptr->headers, (int (*)(VALUE, VALUE, VALUE)) ov_http_client_add_header, (VALUE) headers);
|
|
}
|
|
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, *headers);
|
|
|