From aa53067971c6268e62532bf17082114e4606f92b Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Thu, 31 May 2018 15:38:08 +0200 Subject: [PATCH] utils_time.c: fix implicit conversion warning CC src/daemon/collectd-utils_time.o src/daemon/utils_time.c:153:14: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] if ((len = strftime(pos, size_left, "%Y-%m-%dT%H:%M:%S", t_tm)) == 0) ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. --- src/daemon/utils_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/utils_time.c b/src/daemon/utils_time.c index 5c0f68e7..4637122e 100644 --- a/src/daemon/utils_time.c +++ b/src/daemon/utils_time.c @@ -146,7 +146,7 @@ static int format_zone(char *buffer, size_t buffer_size, int format_rfc3339(char *buffer, size_t buffer_size, struct tm const *t_tm, long nsec, bool print_nano, char const *zone) /* {{{ */ { - int len; + size_t len; char *pos = buffer; size_t size_left = buffer_size; -- 2.11.0