summaryrefslogtreecommitdiff
path: root/components/libc/compilers
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2023-08-07 12:56:12 -0400
committerMeco Man <[email protected]>2023-08-08 22:15:47 -0400
commit92859cc79e2053eb50b555be5002158fab49b9ba (patch)
tree95bae2a33dc4a521217d7a78847d5dd8906bb74d /components/libc/compilers
parentb3f7591811dcd6c273a6e22274daf938a561954b (diff)
[libc][time] silence the incorrect type warning
Diffstat (limited to 'components/libc/compilers')
-rw-r--r--components/libc/compilers/common/ctime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/libc/compilers/common/ctime.c b/components/libc/compilers/common/ctime.c
index ec5fa10b78..e474ea8c12 100644
--- a/components/libc/compilers/common/ctime.c
+++ b/components/libc/compilers/common/ctime.c
@@ -444,7 +444,7 @@ int settimeofday(const struct timeval *tv, const struct timezone *tz)
* The tz_dsttime field has never been used under Linux.
* Thus, the following is purely of historic interest.
*/
- if (tv != RT_NULL && tv->tv_usec >= 0 && tv->tv_sec >= 0)
+ if (tv != RT_NULL && (long)tv->tv_usec >= 0 && (long)tv->tv_sec >= 0)
{
if (_control_rtc(RT_DEVICE_CTRL_RTC_SET_TIMEVAL, (void *)tv) == RT_EOK)
return 0;