From e08e3c11956750e0ec42110c2c796dd6b4cb4c70 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 21 May 2009 19:43:30 +0300 Subject: [PATCH] vlc_clone() and vlc_thread_create() must be checked for errors Those two functions can actually fail and leave the handle undefined. vlc_join() and vlc_thread_join() would then crash (say, be undefined), so errors should be taken care of explicitly. --- include/vlc_threads.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/vlc_threads.h b/include/vlc_threads.h index 52157d8c28..52da2b2840 100644 --- a/include/vlc_threads.h +++ b/include/vlc_threads.h @@ -155,11 +155,11 @@ VLC_EXPORT( int, vlc_threadvar_create, (vlc_threadvar_t * , void (*) (void *) ) VLC_EXPORT( void, vlc_threadvar_delete, (vlc_threadvar_t *) ); VLC_EXPORT( int, vlc_threadvar_set, (vlc_threadvar_t, void *) ); VLC_EXPORT( void *, vlc_threadvar_get, (vlc_threadvar_t) ); -VLC_EXPORT( int, vlc_thread_create, ( vlc_object_t *, const char *, int, const char *, void * ( * ) ( vlc_object_t * ), int ) ); +VLC_EXPORT( int, vlc_thread_create, ( vlc_object_t *, const char *, int, const char *, void * ( * ) ( vlc_object_t * ), int ) LIBVLC_USED ); VLC_EXPORT( int, __vlc_thread_set_priority, ( vlc_object_t *, const char *, int, int ) ); VLC_EXPORT( void, __vlc_thread_join, ( vlc_object_t * ) ); -VLC_EXPORT( int, vlc_clone, (vlc_thread_t *, void * (*) (void *), void *, int) ); +VLC_EXPORT( int, vlc_clone, (vlc_thread_t *, void * (*) (void *), void *, int) LIBVLC_USED ); VLC_EXPORT( void, vlc_cancel, (vlc_thread_t) ); VLC_EXPORT( void, vlc_join, (vlc_thread_t, void **) ); VLC_EXPORT (void, vlc_control_cancel, (int cmd, ...)); -- 2.39.2