You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/20 00:02:35 UTC

[incubator-nuttx] branch master updated: libs/libc/unistd/lib_alarm.c, sched/timer/timer_getitimer.c: Silence a warning with struct initialization.

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new f8801e1  libs/libc/unistd/lib_alarm.c,sched/timer/timer_getitimer.c: Silence a warning with struct initialization.
f8801e1 is described below

commit f8801e1bd8484b797c629cb7f87249d0758326d6
Author: Ouss4 <ab...@gmail.com>
AuthorDate: Thu Feb 20 00:39:54 2020 +0000

    libs/libc/unistd/lib_alarm.c,sched/timer/timer_getitimer.c: Silence a
    warning with struct initialization.
---
 libs/libc/unistd/lib_alarm.c  | 6 ++++--
 sched/timer/timer_getitimer.c | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/libs/libc/unistd/lib_alarm.c b/libs/libc/unistd/lib_alarm.c
index 40a0fc3..6063110 100644
--- a/libs/libc/unistd/lib_alarm.c
+++ b/libs/libc/unistd/lib_alarm.c
@@ -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;
diff --git a/sched/timer/timer_getitimer.c b/sched/timer/timer_getitimer.c
index c5a5965..a19a6c6 100644
--- a/sched/timer/timer_getitimer.c
+++ b/sched/timer/timer_getitimer.c
@@ -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;