X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_match.c;h=c19c5ffc3671d7fdd45d581aea4032d949f182cb;hb=bf90793e82989b1c36fe8f3b66b9c9fe05c9532d;hp=9e75e4e2bdfacfe4dee2a67fc117809ac9fd1792;hpb=250dc17bfb3c5488b789347f1f570913701d31ca;p=collectd.git diff --git a/src/utils_match.c b/src/utils_match.c index 9e75e4e2..c19c5ffc 100644 --- a/src/utils_match.c +++ b/src/utils_match.c @@ -50,7 +50,7 @@ static char *match_substr (const char *str, int begin, int end) if ((begin < 0) || (end < 0) || (begin >= end)) return (NULL); - if (end > (strlen (str) + 1)) + if ((size_t) end > (strlen (str) + 1)) { ERROR ("utils_match: match_substr: `end' points after end of string."); return (NULL); @@ -68,7 +68,7 @@ static char *match_substr (const char *str, int begin, int end) return (ret); } /* char *match_substr */ -static int default_callback (const char *str, +static int default_callback (const char __attribute__((unused)) *str, char * const *matches, size_t matches_num, void *user_data) { cu_match_value_t *data = (cu_match_value_t *) user_data; @@ -228,7 +228,7 @@ int match_apply (cu_match_t *obj, const char *str) regmatch_t re_match[32]; char *matches[32]; size_t matches_num; - int i; + size_t i; if ((obj == NULL) || (str == NULL)) return (-1);