From 963a5a3e82ded7ee75adae72ae7cb14796fa150e Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 16 Jan 2015 17:47:07 +0000 Subject: py, unix: Allow to compile with -Wsign-compare. See issue #699. --- py/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/parse.c') diff --git a/py/parse.c b/py/parse.c index c60bbb17e5..19975c71cd 100644 --- a/py/parse.c +++ b/py/parse.c @@ -316,7 +316,7 @@ STATIC void push_result_token(parser_t *parser) { for (; i < len; i++) { mp_uint_t dig; int clower = str[i] | 0x20; - if (unichar_isdigit(str[i]) && str[i] - '0' < base) { + if (unichar_isdigit(str[i]) && (mp_uint_t)(str[i] - '0') < base) { dig = str[i] - '0'; } else if (base == 16 && 'a' <= clower && clower <= 'f') { dig = clower - 'a' + 10; -- cgit v1.2.3