Add explicit cast for pthread lock initialiser.

This commit is contained in:
theraven 2013-05-28 10:00:11 +00:00
parent 8baefbe5c8
commit 0ed2182b83

2
lock.h
View File

@ -23,7 +23,7 @@ typedef pthread_mutex_t mutex_t;
// If this pthread implementation has a static initializer for recursive
// mutexes, use that, otherwise fall back to the portable version
# ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
# define INIT_LOCK(x) x = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
# define INIT_LOCK(x) x = (pthread_mutex_t)PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
# elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
# define INIT_LOCK(x) x = (pthread_mutex_t)PTHREAD_RECURSIVE_MUTEX_INITIALIZER
# else