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

View file

@ -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;

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 *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 */

View file

@ -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;