mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:20:01 +08:00
libs/libc/unistd/lib_alarm.c,sched/timer/timer_getitimer.c: Silence a
warning with struct initialization.
This commit is contained in:
@@ -70,12 +70,14 @@ unsigned int alarm(unsigned int seconds)
|
||||
{
|
||||
struct itimerval value =
|
||||
{
|
||||
0, 0
|
||||
{0, 0},
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
struct itimerval ovalue =
|
||||
{
|
||||
0, 0
|
||||
{0, 0},
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
value.it_value.tv_sec = seconds;
|
||||
|
||||
@@ -86,7 +86,8 @@ int getitimer(int which, FAR struct itimerval *value)
|
||||
FAR struct tcb_s *rtcb = this_task();
|
||||
struct itimerspec spec =
|
||||
{
|
||||
0, 0
|
||||
{0, 0},
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
int ret = OK;
|
||||
|
||||
Reference in New Issue
Block a user