[vlc-devel] [PATCH] test: thread: avoid macro when calling vlc_tick_sleep

Marvin Scholz epirat07 at gmail.com
Mon Mar 30 16:20:39 CEST 2020


This avoids warnings about harmful delay when compiling
the test with GCC
---
 src/test/thread.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/thread.c b/src/test/thread.c
index 9f48229d53..9acc74a256 100644
--- a/src/test/thread.c
+++ b/src/test/thread.c
@@ -319,7 +319,7 @@ static void test__cond_wait_timeout()
 static void *thread_func_tick_sleep(void *data)
 {
     assert(data == &thread_data_magic);
-    vlc_tick_sleep(VLC_TICK_FROM_SEC(10));
+    (vlc_tick_sleep)(VLC_TICK_FROM_SEC(10));
     return &thread_return_magic;
 }
 
@@ -338,7 +338,7 @@ static void test__vlc_tick_sleep()
 {
     vlc_tick_t now = vlc_tick_now();
 
-    vlc_tick_sleep(VLC_TICK_FROM_MS(25));
+    (vlc_tick_sleep)(VLC_TICK_FROM_MS(25));
 
     vlc_tick_t elapsed = vlc_tick_now() - now;
     assert(elapsed >= VLC_TICK_FROM_MS(25));
-- 
2.24.1 (Apple Git-126)



More information about the vlc-devel mailing list