mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
Merge pull request #1936 from RincewindsHat/Compiler_warnings_cast_function_type
check_curl: Compiler warnings cast function type
This commit is contained in:
commit
b1801c1084
1 changed files with 8 additions and 10 deletions
|
|
@ -239,10 +239,10 @@ void print_help (void);
|
|||
void print_usage (void);
|
||||
void print_curl_version (void);
|
||||
int curlhelp_initwritebuffer (curlhelp_write_curlbuf*);
|
||||
int curlhelp_buffer_write_callback (void*, size_t , size_t , void*);
|
||||
size_t curlhelp_buffer_write_callback(void*, size_t , size_t , void*);
|
||||
void curlhelp_freewritebuffer (curlhelp_write_curlbuf*);
|
||||
int curlhelp_initreadbuffer (curlhelp_read_curlbuf *, const char *, size_t);
|
||||
int curlhelp_buffer_read_callback (void *, size_t , size_t , void *);
|
||||
size_t curlhelp_buffer_read_callback(void *, size_t , size_t , void *);
|
||||
void curlhelp_freereadbuffer (curlhelp_read_curlbuf *);
|
||||
curlhelp_ssl_library curlhelp_get_ssl_library ();
|
||||
const char* curlhelp_get_ssl_library_string (curlhelp_ssl_library);
|
||||
|
|
@ -485,7 +485,7 @@ check_http (void)
|
|||
|
||||
/* register cleanup function to shut down libcurl properly */
|
||||
atexit (cleanup);
|
||||
|
||||
|
||||
if (verbose >= 1)
|
||||
handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_VERBOSE, 1), "CURLOPT_VERBOSE");
|
||||
|
||||
|
|
@ -805,7 +805,7 @@ check_http (void)
|
|||
handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_INFILESIZE, (curl_off_t)strlen (http_post_data)), "CURLOPT_INFILESIZE");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* cookie handling */
|
||||
if (cookie_jar_file != NULL) {
|
||||
handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_COOKIEJAR, cookie_jar_file), "CURLOPT_COOKIEJAR");
|
||||
|
|
@ -1167,7 +1167,7 @@ GOT_FIRST_CERT:
|
|||
else
|
||||
msg[strlen(msg)-3] = '\0';
|
||||
}
|
||||
|
||||
|
||||
/* TODO: separate _() msg and status code: die (result, "HTTP %s: %s\n", state_text(result), msg); */
|
||||
die (result, "HTTP %s: %s %d %s%s%s - %d bytes in %.3f second response time %s|%s\n%s%s",
|
||||
state_text(result), string_statuscode (status_line.http_major, status_line.http_minor),
|
||||
|
|
@ -1694,7 +1694,7 @@ process_arguments (int argc, char **argv)
|
|||
else {
|
||||
max_depth = atoi (optarg);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case 'f': /* onredirect */
|
||||
if (!strcmp (optarg, "ok"))
|
||||
onredirect = STATE_OK;
|
||||
|
|
@ -2171,8 +2171,7 @@ curlhelp_initwritebuffer (curlhelp_write_curlbuf *buf)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
curlhelp_buffer_write_callback (void *buffer, size_t size, size_t nmemb, void *stream)
|
||||
size_t curlhelp_buffer_write_callback (void *buffer, size_t size, size_t nmemb, void *stream)
|
||||
{
|
||||
curlhelp_write_curlbuf *buf = (curlhelp_write_curlbuf *)stream;
|
||||
|
||||
|
|
@ -2192,8 +2191,7 @@ curlhelp_buffer_write_callback (void *buffer, size_t size, size_t nmemb, void *s
|
|||
return (int)(size * nmemb);
|
||||
}
|
||||
|
||||
int
|
||||
curlhelp_buffer_read_callback (void *buffer, size_t size, size_t nmemb, void *stream)
|
||||
size_t curlhelp_buffer_read_callback(void *buffer, size_t size, size_t nmemb, void *stream)
|
||||
{
|
||||
curlhelp_read_curlbuf *buf = (curlhelp_read_curlbuf *)stream;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue