From: Ruben Kerkhof Date: Fri, 1 Jun 2018 18:12:02 +0000 (+0200) Subject: memcached plugin: fix implicit conversion warning X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=860c077fc3b5afbe9e347a875621f2e2c5d1904d;p=collectd.git memcached plugin: fix implicit conversion warning CC src/memcached.lo src/memcached.c:478:20: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] int name_len = strlen(fields[1]); ~~~~~~~~ ^~~~~~~~~~~~~~~~~ 1 warning generated. --- diff --git a/src/memcached.c b/src/memcached.c index 11df999d..4ff70f7c 100644 --- a/src/memcached.c +++ b/src/memcached.c @@ -475,7 +475,7 @@ static int memcached_read(user_data_t *user_data) { if (strsplit(line, fields, 3) != 3) continue; - int name_len = strlen(fields[1]); + size_t name_len = strlen(fields[1]); if (name_len == 0) continue;