From 9fdc37473ea017eb5ea6b2239c14d227cfc85829 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 12 Dec 2015 15:32:23 +0100 Subject: [PATCH] redis plugin: fix build error on NetBSD Making all in daemon CC redis_la-redis.lo redis.c: In function 'redis_handle_info': redis.c:307:5: error: array subscript has type 'char' [-Werror=char-subscripts] for(i=0;(*str && (isdigit(*str) || *str == '.'));i++,str++) ^ cc1: all warnings being treated as errors *** Error code 1 Stop. make[3]: stopped in /home/ruben/src/collectd/src *** Error code 1 Stop. make[2]: stopped in /home/ruben/src/collectd/src *** Error code 1 Stop. make[1]: stopped in /home/ruben/src/collectd/src *** Error code 1 Stop. make: stopped in /home/ruben/src/collectd --- src/redis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redis.c b/src/redis.c index a40d2cd2..9282e193 100644 --- a/src/redis.c +++ b/src/redis.c @@ -304,7 +304,7 @@ int redis_handle_info (char *node, char const *info_line, char const *type, char int i; str += strlen (field_name) + 1; /* also skip the ':' */ - for(i=0;(*str && (isdigit(*str) || *str == '.'));i++,str++) + for(i=0;(*str && (isdigit((unsigned char)*str) || *str == '.'));i++,str++) buf[i] = *str; buf[i] ='\0'; -- 2.11.0