summaryrefslogtreecommitdiff
path: root/components/libc/compilers
diff options
context:
space:
mode:
authorguo <[email protected]>2021-10-14 13:35:50 +0800
committerGitHub <[email protected]>2021-10-14 13:35:50 +0800
commit1f28bd89f88e0b81302c64d8969f6b4374c2f147 (patch)
treeadb7d45ad2e29384e0c82cf45ae609f290ed5158 /components/libc/compilers
parenta987cfe0e62c122a34998d89258e1b0d3e843d9e (diff)
parent396b7da6fd35828d97ada728947f81b6cad478e5 (diff)
Merge pull request #5174 from mysterywolf/timewarning
[libc][time] Ensure the data types are consistent
Diffstat (limited to 'components/libc/compilers')
-rw-r--r--components/libc/compilers/common/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c
index 24289088fb..5bfff15914 100644
--- a/components/libc/compilers/common/time.c
+++ b/components/libc/compilers/common/time.c
@@ -240,7 +240,7 @@ RTM_EXPORT(mktime);
char* asctime_r(const struct tm *t, char *buf)
{
/* Checking input validity */
- if (rt_strlen(days) <= (t->tm_wday << 2) || rt_strlen(months) <= (t->tm_mon << 2))
+ if ((int)rt_strlen(days) <= (t->tm_wday << 2) || (int)rt_strlen(months) <= (t->tm_mon << 2))
{
LOG_W("asctime_r: the input parameters exceeded the limit, please check it.");
*(int*) buf = *(int*) days;