From 0e7ec2ffcda6591edb0475da64971b737aa5db6f Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Tue, 5 Dec 2017 04:29:36 +0000 Subject: [PATCH] Add cast to int on tolower() to fix warnings about array subscripts. --- json_tokener.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json_tokener.c b/json_tokener.c index 416058d..620468e 100644 --- a/json_tokener.c +++ b/json_tokener.c @@ -403,7 +403,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok, { char inf_char = *str; if (!(tok->flags & JSON_TOKENER_STRICT)) - inf_char = tolower(*str); + inf_char = tolower((int)*str); if (inf_char != _json_inf_str[tok->st_pos]) { tok->err = json_tokener_error_parse_unexpected;