diff options
| author | Meco Man <[email protected]> | 2021-10-13 23:18:55 -0400 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-10-13 23:24:17 -0400 |
| commit | 396b7da6fd35828d97ada728947f81b6cad478e5 (patch) | |
| tree | 1296596d3d7176c340a30af76ce5101ba74195e6 /components/libc | |
| parent | 5ab2901dad0f2e88300b5218b41ccb57400dcbf9 (diff) | |
[libc][time] Ensure the data types are consistent
Diffstat (limited to 'components/libc')
| -rw-r--r-- | components/libc/compilers/common/time.c | 2 |
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; |
