mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-05-30 19:18:19 +08:00
[libc][time] silence the incorrect type warning
This commit is contained in:
@@ -444,7 +444,7 @@ int settimeofday(const struct timeval *tv, const struct timezone *tz)
|
|||||||
* The tz_dsttime field has never been used under Linux.
|
* The tz_dsttime field has never been used under Linux.
|
||||||
* Thus, the following is purely of historic interest.
|
* 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)
|
if (_control_rtc(RT_DEVICE_CTRL_RTC_SET_TIMEVAL, (void *)tv) == RT_EOK)
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user