mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-28 00:06:20 -04:00
avoid dereferencing void** to remove warnings when building with -Os
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26733 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fc94a92ad1
commit
0ae6f70fdd
1 changed files with 3 additions and 4 deletions
|
|
@ -159,10 +159,9 @@ static void timeout_tick(void)
|
||||||
void timeout_cancel(struct timeout *tmo)
|
void timeout_cancel(struct timeout *tmo)
|
||||||
{
|
{
|
||||||
int oldlevel = disable_irq_save();
|
int oldlevel = disable_irq_save();
|
||||||
void **arr = (void **)tmo_list;
|
int rc = remove_array_ptr((void **)tmo_list, tmo);
|
||||||
int rc = remove_array_ptr(arr, tmo);
|
|
||||||
|
|
||||||
if(rc >= 0 && *arr == NULL)
|
if(rc >= 0 && *tmo_list == NULL)
|
||||||
{
|
{
|
||||||
tick_remove_task(timeout_tick); /* Last one - remove task */
|
tick_remove_task(timeout_tick); /* Last one - remove task */
|
||||||
}
|
}
|
||||||
|
|
@ -193,7 +192,7 @@ void timeout_register(struct timeout *tmo, timeout_cb_type callback,
|
||||||
if(*p == NULL)
|
if(*p == NULL)
|
||||||
{
|
{
|
||||||
/* Not present */
|
/* Not present */
|
||||||
if(*arr == NULL)
|
if(*tmo_list == NULL)
|
||||||
{
|
{
|
||||||
tick_add_task(timeout_tick); /* First one - add task */
|
tick_add_task(timeout_tick); /* First one - add task */
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue