From: RĂ©mi Denis-Courmont Date: Thu, 21 May 2009 16:43:30 +0000 (+0300) Subject: vlc_clone() and vlc_thread_create() must be checked for errors X-Git-Tag: 1.1.0-ff~5836 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e08e3c11956750e0ec42110c2c796dd6b4cb4c70;p=vlc 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. --- 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, ...));