Commit 06b39848 authored by Damien George's avatar Damien George
Browse files

py/parsenum: Fix compiler warnings for no decl and signed comparison.

parent 0be6359f
......@@ -81,7 +81,7 @@ mp_obj_t mp_parse_num_integer(const char *restrict str_, size_t len, int base, m
for (; str < top; str++) {
// get next digit as a value
mp_uint_t dig = *str;
if (unichar_isdigit(dig) && dig - '0' < base) {
if (unichar_isdigit(dig) && (int)dig - '0' < base) {
// 0-9 digit
dig = dig - '0';
} else if (base == 16) {
......
......@@ -24,7 +24,9 @@
* THE SOFTWARE.
*/
#include "py/parsenum.h"
#include "py/mpconfig.h"
#include "py/misc.h"
#include "py/parsenumbase.h"
// find real radix base, and strip preceding '0x', '0o' and '0b'
// puts base in *base, and returns number of bytes to skip the prefix
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment