summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbernard <[email protected]>2023-04-01 16:02:26 +0800
committerMan, Jianting (Meco) <[email protected]>2023-04-01 12:10:23 -0400
commit9ffb66878bfeef13818d39ecdf1298f57f58f4f8 (patch)
tree679f3709b2586fe16f36a398521dff68b0b90ed6
parentbe8b381ac6edcf827a7fa6bccb8d1d009c9a7a8f (diff)
[components] fix dtb compiling warning.
-rw-r--r--components/drivers/fdt/src/dtb_base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/fdt/src/dtb_base.c b/components/drivers/fdt/src/dtb_base.c
index 86b23a8e1c..6b1c580d12 100644
--- a/components/drivers/fdt/src/dtb_base.c
+++ b/components/drivers/fdt/src/dtb_base.c
@@ -14,7 +14,7 @@ static const char *_parse_integer_fixup_radix(const char *s, unsigned int *base)
{
if (s[0] == '0')
{
- if (tolower(s[1]) == 'x' && isxdigit(s[2]))
+ if (tolower(s[1]) == 'x' && isxdigit((int)s[2]))
*base = 16;
else
*base = 8;
@@ -35,7 +35,7 @@ unsigned long simple_strtoul(const char *cp, char **endp,
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)
{
result = result*base + value;