[vlc-devel] [PATCH 2/2] playlist: fix unused var warning with NDEBUG

Thomas Guillem thomas at gllm.fr
Wed Sep 4 09:14:14 CEST 2019


---
 src/playlist/playlist.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/playlist/playlist.h b/src/playlist/playlist.h
index c1bbab6bba..10d514747d 100644
--- a/src/playlist/playlist.h
+++ b/src/playlist/playlist.h
@@ -63,15 +63,15 @@ struct vlc_playlist
     uint64_t idgen;
 };
 
+#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
+/* disable vlc_assert_locked in tests since the symbol is not exported */
+#define vlc_playlist_AssertLocked(x) VLC_UNUSED(x)
+#endif
 
 #endif
-- 
2.20.1



More information about the vlc-devel mailing list