diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c index 16387148f6..96591113b8 100644 --- a/components/libc/compilers/common/time.c +++ b/components/libc/compilers/common/time.c @@ -689,7 +689,7 @@ int rt_timespec_to_tick(const struct timespec *time) { int tick; int nsecond, second; - struct timespec tp; + struct timespec tp = {0}; RT_ASSERT(time != RT_NULL);