Fix non C89 noncompliant code that was causing the ZDS-II compile to fail.

This commit is contained in:
Gregory Nutt
2020-02-19 15:23:26 -06:00
committed by Abdelatif Guettouche
parent 4d6e275fc4
commit 2ec59121fb
3 changed files with 5 additions and 1 deletions
+2
View File
@@ -70,10 +70,12 @@ unsigned int alarm(unsigned int seconds)
{ {
struct itimerval value = struct itimerval value =
{ {
0, 0
}; };
struct itimerval ovalue = struct itimerval ovalue =
{ {
0, 0
}; };
value.it_value.tv_sec = seconds; value.it_value.tv_sec = seconds;
+2 -1
View File
@@ -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 *next;
FAR struct mm_freenode_s *prev; FAR struct mm_freenode_s *prev;
int ndx;
DEBUGASSERT(node->size >= SIZEOF_MM_FREENODE); DEBUGASSERT(node->size >= SIZEOF_MM_FREENODE);
DEBUGASSERT((node->preceding & MM_ALLOC_BIT) == 0); DEBUGASSERT((node->preceding & MM_ALLOC_BIT) == 0);
/* Convert the size to a nodelist index */ /* 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 */ /* Now put the new node into the next */
+1
View File
@@ -86,6 +86,7 @@ int getitimer(int which, FAR struct itimerval *value)
FAR struct tcb_s *rtcb = this_task(); FAR struct tcb_s *rtcb = this_task();
struct itimerspec spec = struct itimerspec spec =
{ {
0, 0
}; };
int ret = OK; int ret = OK;