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

aguettouche 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 2ec5912  Fix non C89 noncompliant code that was causing the ZDS-II 
compile to fail.
2ec5912 is described below

commit 2ec59121fb5a9d08ab15af07a0a925302c902168
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Wed Feb 19 15:23:26 2020 -0600

    Fix non C89 noncompliant code that was causing the ZDS-II compile to fail.
---
 libs/libc/unistd/lib_alarm.c  | 2 ++
 mm/mm_heap/mm_addfreechunk.c  | 3 ++-
 sched/timer/timer_getitimer.c | 1 +
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/libs/libc/unistd/lib_alarm.c b/libs/libc/unistd/lib_alarm.c
index 200931d..40a0fc3 100644
--- a/libs/libc/unistd/lib_alarm.c
+++ b/libs/libc/unistd/lib_alarm.c
@@ -70,10 +70,12 @@ unsigned int alarm(unsigned int seconds)
 {
   struct itimerval value =
   {
+    0, 0
   };
 
   struct itimerval ovalue =
   {
+    0, 0
   };
 
   value.it_value.tv_sec = seconds;
diff --git a/mm/mm_heap/mm_addfreechunk.c b/mm/mm_heap/mm_addfreechunk.c
index b409966..1a2adee 100644
--- a/mm/mm_heap/mm_addfreechunk.c
+++ b/mm/mm_heap/mm_addfreechunk.c
@@ -60,13 +60,14 @@ void mm_addfreechunk(FAR struct mm_heap_s *heap, FAR struct 
mm_freenode_s *node)
 {
   FAR struct mm_freenode_s *next;
   FAR struct mm_freenode_s *prev;
+  int ndx;
 
   DEBUGASSERT(node->size >= SIZEOF_MM_FREENODE);
   DEBUGASSERT((node->preceding & MM_ALLOC_BIT) == 0);
 
   /* Convert the size to a nodelist index */
 
-  int ndx = mm_size2ndx(node->size);
+  ndx = mm_size2ndx(node->size);
 
   /* Now put the new node into the next */
 
diff --git a/sched/timer/timer_getitimer.c b/sched/timer/timer_getitimer.c
index c920dbe..c5a5965 100644
--- a/sched/timer/timer_getitimer.c
+++ b/sched/timer/timer_getitimer.c
@@ -86,6 +86,7 @@ int getitimer(int which, FAR struct itimerval *value)
   FAR struct tcb_s *rtcb = this_task();
   struct itimerspec spec =
   {
+    0, 0
   };
 
   int ret = OK;

Reply via email to