From 4d2744ffe30c785ff19624831e36d01e3f6a6089 Mon Sep 17 00:00:00 2001 From: Dundar Göc Date: Sun, 27 Feb 2022 12:29:33 +0100 Subject: refactor: fix clang-tidy bugprone-signed-char-misuse warnings Prefer to declare variables with correct type instead of explicit casts wherever possible. --- src/cjson/lua_cjson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cjson/lua_cjson.c') diff --git a/src/cjson/lua_cjson.c b/src/cjson/lua_cjson.c index b5f97bc485..c243f93c05 100644 --- a/src/cjson/lua_cjson.c +++ b/src/cjson/lua_cjson.c @@ -1110,7 +1110,7 @@ static int json_is_invalid_number(json_parse_t *json) /* Reject numbers starting with 0x, or leading zeros */ if (*p == '0') { - int ch2 = *(p + 1); + char ch2 = *(p + 1); if ((ch2 | 0x20) == 'x' || /* Hex */ ('0' <= ch2 && ch2 <= '9')) /* Leading zero */ -- cgit