From 6c9086a35eb8e8283a2fd113918ee0016681f7b7 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 22 Jan 2017 10:02:55 +0100 Subject: added some casts for curl write functions --- plugins/check_curl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/check_curl.c b/plugins/check_curl.c index a0e6d8f9..cd77be33 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c @@ -168,13 +168,13 @@ main (int argc, char **argv) /* initialize buffer for body of the answer */ if (curlhelp_initbuffer(&body_buf) < 0) die (STATE_UNKNOWN, "HTTP CRITICAL - out of memory allocating buffer for body\n"); - curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, curlhelp_buffer_callback); + curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)curlhelp_buffer_callback); curl_easy_setopt (curl, CURLOPT_WRITEDATA, (void *)&body_buf); /* initialize buffer for header of the answer */ if (curlhelp_initbuffer( &header_buf ) < 0) die (STATE_UNKNOWN, "HTTP CRITICAL - out of memory allocating buffer for header\n" ); - curl_easy_setopt (curl, CURLOPT_HEADERFUNCTION, curlhelp_buffer_callback); + curl_easy_setopt (curl, CURLOPT_HEADERFUNCTION, (curl_write_callback)curlhelp_buffer_callback); curl_easy_setopt (curl, CURLOPT_WRITEHEADER, (void *)&header_buf); /* set the error buffer */ -- cgit v1.2.3-74-g34f1