[vlc-devel] commit: vlc_clone() and vlc_thread_create() must be checked for errors ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu May 21 18:46:35 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 21 19:43:30 2009 +0300| [e08e3c11956750e0ec42110c2c796dd6b4cb4c70] | committer: Rémi Denis-Courmont 

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e08e3c11956750e0ec42110c2c796dd6b4cb4c70
---

 include/vlc_threads.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index 52157d8..52da2b2 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, ...));




More information about the vlc-devel mailing list