mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-09-14 03:56:41 +00:00
Fixed warnings when assigning time_t to int/u32_t
This commit is contained in:
parent
2a2617bc19
commit
907ea97876
@ -374,8 +374,8 @@ sys_sem_new(struct sys_sem **sem, u8_t count)
|
|||||||
static u32_t
|
static u32_t
|
||||||
cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex, u32_t timeout)
|
cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex, u32_t timeout)
|
||||||
{
|
{
|
||||||
int tdiff;
|
time_t tdiff;
|
||||||
unsigned long sec, usec;
|
time_t sec, usec;
|
||||||
struct timeval rtime1, rtime2;
|
struct timeval rtime1, rtime2;
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
int retval;
|
int retval;
|
||||||
@ -404,12 +404,11 @@ cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex, u32_t timeout)
|
|||||||
if (tdiff <= 0) {
|
if (tdiff <= 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
return (u32_t)tdiff;
|
||||||
return tdiff;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pthread_cond_wait(cond, mutex);
|
pthread_cond_wait(cond, mutex);
|
||||||
return SYS_ARCH_TIMEOUT;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
@ -438,7 +437,7 @@ sys_arch_sem_wait(struct sys_sem **s, u32_t timeout)
|
|||||||
}
|
}
|
||||||
sem->c--;
|
sem->c--;
|
||||||
pthread_mutex_unlock(&(sem->mutex));
|
pthread_mutex_unlock(&(sem->mutex));
|
||||||
return time_needed;
|
return (u32_t)time_needed;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user