summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY2
-rw-r--r--thread.c10
3 files changed, 11 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index c1977138..23cffcdc 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1446,6 +1446,8 @@ Ville Skyttä <ville.skytta@iki.fi>
for making LIRC command parsing more robust
for fixing some typos in MANUAL
for reporting that the default value for "Setup/EPG bugfix level" was wrong
+ for fixing initializing pthread_mutexattr_t and pthread_rwlockattr_t to avoid
+ warnings with g++ 4.1.0
Steffen Beyer <cpunk@reactor.de>
for fixing setting the colored button help after deleting a recording in case the next
diff --git a/HISTORY b/HISTORY
index 6b9e43fb..edf19fb8 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4058,3 +4058,5 @@ Video Disk Recorder Revision History
- Removed unused variables in skinclassic.c and skinsttng.c (thanks to Marco
Schlüßler).
- Made the static cControl functions thread safe (thanks to Patrick Fischer).
+- Fixed initializing pthread_mutexattr_t and pthread_rwlockattr_t to avoid
+ warnings with g++ 4.1.0 (thanks to Ville Skyttä).
diff --git a/thread.c b/thread.c
index bf5ef6a2..3710817d 100644
--- a/thread.c
+++ b/thread.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: thread.c 1.47 2005/12/11 12:09:24 kls Exp $
+ * $Id: thread.c 1.48 2006/01/01 14:50:44 kls Exp $
*/
#include "thread.h"
@@ -137,7 +137,9 @@ void cCondVar::Broadcast(void)
cRwLock::cRwLock(bool PreferWriter)
{
- pthread_rwlockattr_t attr = { PreferWriter ? PTHREAD_RWLOCK_PREFER_WRITER_NP : PTHREAD_RWLOCK_PREFER_READER_NP };
+ pthread_rwlockattr_t attr;
+ pthread_rwlockattr_init(&attr);
+ pthread_rwlockattr_setkind_np(&attr, PreferWriter ? PTHREAD_RWLOCK_PREFER_WRITER_NP : PTHREAD_RWLOCK_PREFER_READER_NP);
pthread_rwlock_init(&rwlock, &attr);
}
@@ -171,7 +173,9 @@ void cRwLock::Unlock(void)
cMutex::cMutex(void)
{
locked = 0;
- pthread_mutexattr_t attr = { PTHREAD_MUTEX_ERRORCHECK_NP };
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_init(&attr);
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK_NP);
pthread_mutex_init(&mutex, &attr);
}