mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
mpegplayer fix warnings
this should fix 'warning: cast between incompatible function types' Change-Id: I7d192b8953fd14511431cb50254900f566eb0574
This commit is contained in:
parent
9ed486bdc7
commit
3d72119dd4
4 changed files with 13 additions and 11 deletions
|
|
@ -108,7 +108,7 @@ static int disk_buf_on_data_notify(struct stream_hdr *sh)
|
||||||
return DISK_BUF_NOTIFY_ERROR;
|
return DISK_BUF_NOTIFY_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool check_data_notifies_callback(struct stream_hdr *sh, intptr_t data)
|
static bool check_data_notifies_callback(struct stream_hdr *sh, void *data)
|
||||||
{
|
{
|
||||||
if (disk_buf_is_data_ready(sh, 0))
|
if (disk_buf_is_data_ready(sh, 0))
|
||||||
{
|
{
|
||||||
|
|
@ -130,7 +130,7 @@ static inline void check_data_notifies(void)
|
||||||
{
|
{
|
||||||
list_enum_items(nf_list,
|
list_enum_items(nf_list,
|
||||||
(list_enum_callback_t)check_data_notifies_callback,
|
(list_enum_callback_t)check_data_notifies_callback,
|
||||||
0);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear all registered notifications - do not post them */
|
/* Clear all registered notifications - do not post them */
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ void list_clear_all(void **list)
|
||||||
* may return 'false' to stop the enumeration early. */
|
* may return 'false' to stop the enumeration early. */
|
||||||
void list_enum_items(void **list,
|
void list_enum_items(void **list,
|
||||||
list_enum_callback_t callback,
|
list_enum_callback_t callback,
|
||||||
intptr_t data)
|
void* data)
|
||||||
{
|
{
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -222,11 +222,11 @@ void list_add_item(void **list, void *item);
|
||||||
void list_clear_all(void **list);
|
void list_clear_all(void **list);
|
||||||
|
|
||||||
/* Enumerate all items in the array. */
|
/* Enumerate all items in the array. */
|
||||||
typedef bool (*list_enum_callback_t)(void *item, intptr_t data);
|
typedef bool (*list_enum_callback_t)(void *item, void* data);
|
||||||
|
|
||||||
void list_enum_items(void **list,
|
void list_enum_items(void **list,
|
||||||
list_enum_callback_t callback,
|
list_enum_callback_t callback,
|
||||||
intptr_t data);
|
void *data);
|
||||||
|
|
||||||
|
|
||||||
/** System events **/
|
/** System events **/
|
||||||
|
|
|
||||||
|
|
@ -155,13 +155,13 @@ void stream_add_stream(struct stream *str)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Callback for various list-moving operations */
|
/* Callback for various list-moving operations */
|
||||||
static bool strl_enum_callback(struct stream *str, intptr_t data)
|
static bool strl_enum_callback(struct stream *str, void *data)
|
||||||
{
|
{
|
||||||
actl_lock();
|
actl_lock();
|
||||||
|
|
||||||
list_remove_item(stream_mgr.strl, str);
|
list_remove_item(stream_mgr.strl, str);
|
||||||
|
|
||||||
if (data == 1)
|
if (*(int*)data == 1)
|
||||||
list_add_item(stream_mgr.actl, str);
|
list_add_item(stream_mgr.actl, str);
|
||||||
|
|
||||||
actl_unlock();
|
actl_unlock();
|
||||||
|
|
@ -172,15 +172,17 @@ static bool strl_enum_callback(struct stream *str, intptr_t data)
|
||||||
/* Clear all streams from active and playback pools */
|
/* Clear all streams from active and playback pools */
|
||||||
void stream_remove_streams(void)
|
void stream_remove_streams(void)
|
||||||
{
|
{
|
||||||
|
int add_item = 0;
|
||||||
list_enum_items(stream_mgr.strl,
|
list_enum_items(stream_mgr.strl,
|
||||||
(list_enum_callback_t)strl_enum_callback, 0);
|
(list_enum_callback_t)strl_enum_callback, (void *)&add_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Move the playback pool to the active list */
|
/* Move the playback pool to the active list */
|
||||||
void move_strl_to_actl(void)
|
void move_strl_to_actl(void)
|
||||||
{
|
{
|
||||||
|
int add_item = 1;
|
||||||
list_enum_items(stream_mgr.strl,
|
list_enum_items(stream_mgr.strl,
|
||||||
(list_enum_callback_t)strl_enum_callback, 1);
|
(list_enum_callback_t)strl_enum_callback, (void *)&add_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove a stream from the active list and return it to the pool */
|
/* Remove a stream from the active list and return it to the pool */
|
||||||
|
|
@ -238,7 +240,7 @@ static void actl_stream_broadcast(int cmd, intptr_t data)
|
||||||
sbd.data = data;
|
sbd.data = data;
|
||||||
list_enum_items(stream_mgr.actl,
|
list_enum_items(stream_mgr.actl,
|
||||||
(list_enum_callback_t)actl_stream_broadcast_callback,
|
(list_enum_callback_t)actl_stream_broadcast_callback,
|
||||||
(intptr_t)&sbd);
|
(void*)&sbd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the current base clock */
|
/* Set the current base clock */
|
||||||
|
|
@ -923,7 +925,7 @@ bool stream_get_window(struct stream_window *sw)
|
||||||
actl_lock();
|
actl_lock();
|
||||||
list_enum_items(stream_mgr.actl,
|
list_enum_items(stream_mgr.actl,
|
||||||
(list_enum_callback_t)stream_get_window_callback,
|
(list_enum_callback_t)stream_get_window_callback,
|
||||||
(intptr_t)sw);
|
(void*)sw);
|
||||||
actl_unlock();
|
actl_unlock();
|
||||||
|
|
||||||
return sw->left <= sw->right;
|
return sw->left <= sw->right;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue