X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fcurl_xml.c;h=39d6fd04b3c93f5ac9bec31df153f8093203e626;hb=b758f3b7146f1497d93e1df64cbc0c14ae164768;hp=3ffb71c559c77d3f00d5f8027880646be0f7c2be;hpb=6d13532642c934667697842e4ff021e070ddf34d;p=collectd.git diff --git a/src/curl_xml.c b/src/curl_xml.c index 3ffb71c5..39d6fd04 100644 --- a/src/curl_xml.c +++ b/src/curl_xml.c @@ -50,7 +50,7 @@ struct cx_xpath_s /* {{{ */ char *path; char *type; cx_values_t *values; - int values_len; + size_t values_len; char *instance_prefix; char *instance; int is_table; @@ -240,7 +240,7 @@ static int cx_check_type (const data_set_t *ds, cx_xpath_t *xpath) /* {{{ */ if (ds->ds_num != xpath->values_len) { - WARNING ("curl_xml plugin: DataSet `%s' requires %i values, but config talks about %i", + WARNING ("curl_xml plugin: DataSet `%s' requires %zu values, but config talks about %zu", xpath->type, ds->ds_num, xpath->values_len); return (-1); } @@ -356,7 +356,7 @@ static int cx_handle_all_value_xpaths (xmlXPathContextPtr xpath_ctx, /* {{{ */ { value_t values[xpath->values_len]; int status; - int i; + size_t i; assert (xpath->values_len > 0); assert (xpath->values_len == vl->values_len); @@ -689,7 +689,7 @@ static int cx_config_add_values (const char *name, cx_xpath_t *xpath, /* {{{ */ xpath->values = (cx_values_t *) malloc (sizeof (cx_values_t) * ci->values_num); if (xpath->values == NULL) return (-1); - xpath->values_len = ci->values_num; + xpath->values_len = (size_t) ci->values_num; /* populate cx_values_t structure */ for (i = 0; i < ci->values_num; i++) @@ -903,8 +903,7 @@ static int cx_init_curl (cx_t *db) /* {{{ */ if (db->timeout >= 0) curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, (long) db->timeout); else - curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, - CDTIME_T_TO_MS(plugin_get_interval())); + curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, (long) CDTIME_T_TO_MS(plugin_get_interval())); #endif return (0); @@ -1022,7 +1021,7 @@ static int cx_config_add_url (oconfig_item_t *ci) /* {{{ */ cb_name = ssnprintf_alloc ("curl_xml-%s-%s", db->instance, db->url); plugin_register_complex_read (/* group = */ "curl_xml", cb_name, cx_read, - /* interval = */ NULL, &ud); + /* interval = */ 0, &ud); sfree (cb_name); } else