Commit 5ae87e74 authored by Thomas Guillem's avatar Thomas Guillem

playlist: fix unused var warning with NDEBUG

parent 9c31e4bf
......@@ -70,7 +70,9 @@ void
vlc_playlist_RemoveListener(vlc_playlist_t *playlist,
vlc_playlist_listener_id *listener)
{
vlc_playlist_AssertLocked(playlist);
/* The playlist head is not needed to remove a node, but the list must be
* locked. */
vlc_playlist_AssertLocked(playlist); VLC_UNUSED(playlist);
vlc_list_remove(&listener->node);
free(listener);
......
......@@ -63,15 +63,15 @@ struct vlc_playlist
uint64_t idgen;
};
/* Also disable vlc_assert_locked in tests since the symbol is not exported */
#if !defined(NDEBUG) && !defined(TEST_PLAYLIST)
static inline void
vlc_playlist_AssertLocked(vlc_playlist_t *playlist)
{
#ifdef TEST_PLAYLIST
/* disable vlc_assert_locked in tests since the symbol is not exported */
VLC_UNUSED(playlist);
#else
vlc_player_assert_locked(playlist->player);
#endif
}
#else
#define vlc_playlist_AssertLocked(x) ((void) (0))
#endif
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment