diff options
author | William Wilgus <me.theuser@yahoo.com> | 2018-11-26 01:51:09 -0500 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2018-11-26 01:51:09 -0500 |
commit | 3d72119dd462a82e7c253430a3ef8d1f104cdce2 (patch) | |
tree | 5b0a7ef62ffa7259cdbc0042d29d087a7567ff82 /apps/plugins/mpegplayer/stream_mgr.c | |
parent | 9ed486bdc747b505a5b7b868c363dcff3e718a0d (diff) | |
download | rockbox-3d72119dd462a82e7c253430a3ef8d1f104cdce2.tar.gz rockbox-3d72119dd462a82e7c253430a3ef8d1f104cdce2.zip |
mpegplayer fix warnings
this should fix 'warning: cast between incompatible function types'
Change-Id: I7d192b8953fd14511431cb50254900f566eb0574
Diffstat (limited to 'apps/plugins/mpegplayer/stream_mgr.c')
-rw-r--r-- | apps/plugins/mpegplayer/stream_mgr.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c index 7c862d58fb..3cac8c0f57 100644 --- a/apps/plugins/mpegplayer/stream_mgr.c +++ b/apps/plugins/mpegplayer/stream_mgr.c | |||
@@ -155,13 +155,13 @@ void stream_add_stream(struct stream *str) | |||
155 | } | 155 | } |
156 | 156 | ||
157 | /* Callback for various list-moving operations */ | 157 | /* Callback for various list-moving operations */ |
158 | static bool strl_enum_callback(struct stream *str, intptr_t data) | 158 | static bool strl_enum_callback(struct stream *str, void *data) |
159 | { | 159 | { |
160 | actl_lock(); | 160 | actl_lock(); |
161 | 161 | ||
162 | list_remove_item(stream_mgr.strl, str); | 162 | list_remove_item(stream_mgr.strl, str); |
163 | 163 | ||
164 | if (data == 1) | 164 | if (*(int*)data == 1) |
165 | list_add_item(stream_mgr.actl, str); | 165 | list_add_item(stream_mgr.actl, str); |
166 | 166 | ||
167 | actl_unlock(); | 167 | actl_unlock(); |
@@ -172,15 +172,17 @@ static bool strl_enum_callback(struct stream *str, intptr_t data) | |||
172 | /* Clear all streams from active and playback pools */ | 172 | /* Clear all streams from active and playback pools */ |
173 | void stream_remove_streams(void) | 173 | void stream_remove_streams(void) |
174 | { | 174 | { |
175 | int add_item = 0; | ||
175 | list_enum_items(stream_mgr.strl, | 176 | list_enum_items(stream_mgr.strl, |
176 | (list_enum_callback_t)strl_enum_callback, 0); | 177 | (list_enum_callback_t)strl_enum_callback, (void *)&add_item); |
177 | } | 178 | } |
178 | 179 | ||
179 | /* Move the playback pool to the active list */ | 180 | /* Move the playback pool to the active list */ |
180 | void move_strl_to_actl(void) | 181 | void move_strl_to_actl(void) |
181 | { | 182 | { |
183 | int add_item = 1; | ||
182 | list_enum_items(stream_mgr.strl, | 184 | list_enum_items(stream_mgr.strl, |
183 | (list_enum_callback_t)strl_enum_callback, 1); | 185 | (list_enum_callback_t)strl_enum_callback, (void *)&add_item); |
184 | } | 186 | } |
185 | 187 | ||
186 | /* Remove a stream from the active list and return it to the pool */ | 188 | /* 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) | |||
238 | sbd.data = data; | 240 | sbd.data = data; |
239 | list_enum_items(stream_mgr.actl, | 241 | list_enum_items(stream_mgr.actl, |
240 | (list_enum_callback_t)actl_stream_broadcast_callback, | 242 | (list_enum_callback_t)actl_stream_broadcast_callback, |
241 | (intptr_t)&sbd); | 243 | (void*)&sbd); |
242 | } | 244 | } |
243 | 245 | ||
244 | /* Set the current base clock */ | 246 | /* Set the current base clock */ |
@@ -923,7 +925,7 @@ bool stream_get_window(struct stream_window *sw) | |||
923 | actl_lock(); | 925 | actl_lock(); |
924 | list_enum_items(stream_mgr.actl, | 926 | list_enum_items(stream_mgr.actl, |
925 | (list_enum_callback_t)stream_get_window_callback, | 927 | (list_enum_callback_t)stream_get_window_callback, |
926 | (intptr_t)sw); | 928 | (void*)sw); |
927 | actl_unlock(); | 929 | actl_unlock(); |
928 | 930 | ||
929 | return sw->left <= sw->right; | 931 | return sw->left <= sw->right; |