4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-28 13:05:33 +08:00

[components] fix dtb compiling warning.

This commit is contained in:
bernard 2023-04-01 16:02:26 +08:00 committed by Man, Jianting (Meco)
parent be8b381ac6
commit 9ffb66878b

@ -14,7 +14,7 @@ static const char *_parse_integer_fixup_radix(const char *s, unsigned int *base)
{ {
if (s[0] == '0') if (s[0] == '0')
{ {
if (tolower(s[1]) == 'x' && isxdigit(s[2])) if (tolower(s[1]) == 'x' && isxdigit((int)s[2]))
*base = 16; *base = 16;
else else
*base = 8; *base = 8;
@ -35,7 +35,7 @@ unsigned long simple_strtoul(const char *cp, char **endp,
cp = _parse_integer_fixup_radix(cp, &base); cp = _parse_integer_fixup_radix(cp, &base);
while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp) while (isxdigit((int)*cp) && (value = isdigit((int)*cp) ? *cp-'0' : (islower((int)*cp)
? toupper(*cp) : *cp)-'A'+10) < base) ? toupper(*cp) : *cp)-'A'+10) < base)
{ {
result = result*base + value; result = result*base + value;