From: Florian Forster Date: Mon, 26 May 2008 13:27:35 +0000 (+0200) Subject: src/{email,ntpd,utils_cmd_getval}.c: Fix formatting errors. X-Git-Tag: collectd-4.4.1~5^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=3d6e459ba3ca15e95cae01aa2717ba9fb4a44a6b;p=collectd.git src/{email,ntpd,utils_cmd_getval}.c: Fix formatting errors. --- diff --git a/src/email.c b/src/email.c index 87daed11..ed10e349 100644 --- a/src/email.c +++ b/src/email.c @@ -292,7 +292,7 @@ static void *collect (void *arg) len = strlen (line); if (('\n' != line[len - 1]) && ('\r' != line[len - 1])) { - log_warn ("[thread #%5lu] line too long (> %i characters): " + log_warn ("[thread #%5lu] line too long (> %lu characters): " "'%s' (truncated)", self, sizeof (line) - 1, line); while (NULL != fgets (line, sizeof (line), this->socket)) diff --git a/src/ntpd.c b/src/ntpd.c index 90fdfd7c..7abc7435 100644 --- a/src/ntpd.c +++ b/src/ntpd.c @@ -613,7 +613,7 @@ static int ntpd_receive_response (int *res_items, int *res_size, if (pkt_item_len < res_item_size) pkt_padding = res_item_size - pkt_item_len; DEBUG ("res_item_size = %i; pkt_padding = %i;", - res_item_size, pkt_padding); + res_item_size, (int) pkt_padding); /* Extract the sequence number */ pkt_sequence = INFO_SEQ (res.auth_seq); @@ -652,7 +652,7 @@ static int ntpd_receive_response (int *res_items, int *res_size, * We start by allocating some more memory. */ DEBUG ("realloc (%p, %i)", (void *) *res_data, - (items_num + pkt_item_num) * res_item_size); + (int) (items_num + pkt_item_num) * res_item_size); items = realloc ((void *) *res_data, (items_num + pkt_item_num) * res_item_size); if (items == NULL) diff --git a/src/utils_cmd_getval.c b/src/utils_cmd_getval.c index 01c68996..470d3022 100644 --- a/src/utils_cmd_getval.c +++ b/src/utils_cmd_getval.c @@ -102,8 +102,8 @@ int handle_getval (FILE *fh, char **fields, int fields_num) if (ds->ds_num != values_num) { ERROR ("ds[%s]->ds_num = %i, " - "but uc_get_rate_by_name returned %i values.", - ds->type, ds->ds_num, values_num); + "but uc_get_rate_by_name returned %u values.", + ds->type, ds->ds_num, (unsigned int) values_num); print_to_socket (fh, "-1 Error reading value from cache.\n"); sfree (values); sfree (identifier_copy);