summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-12-19 16:14:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-12-19 16:14:40 (GMT)
commit8a2ea780c61e56cc4a7e757c880df05992930c5a (patch)
treef9ee31d9f36e04c991b872e11920c35c65af3cd6
parentbddcdb160a30d1b32f7443b82612ee135824893e (diff)
downloadtcl-8a2ea780c61e56cc4a7e757c880df05992930c5a.zip
tcl-8a2ea780c61e56cc4a7e757c880df05992930c5a.tar.gz
tcl-8a2ea780c61e56cc4a7e757c880df05992930c5a.tar.bz2
Fix [Bug 1618838]
-rw-r--r--ChangeLog5
-rw-r--r--unix/tclUnixThrd.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cde9128..b7496e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-19 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * unix/tclUnixThrd.c (Tcl_GetAllocMutex, TclpNewAllocMutex): Add
+ intermediate variables to shut up unwanted warnings. [Bug 1618838]
+
2006-12-19 Daniel Steffen <das@users.sourceforge.net>
* unix/tclUnixThrd.c (TclpInetNtoa): fix for 64 bit.
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 8fc8c63..8a48c50 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -440,7 +440,8 @@ Tcl_Mutex *
Tcl_GetAllocMutex(void)
{
#ifdef TCL_THREADS
- return (Tcl_Mutex *)&allocLockPtr;
+ pthread_mutex_t **allocLockPtrPtr = &allocLockPtr;
+ return (Tcl_Mutex *) allocLockPtrPtr;
#else
return NULL;
#endif
@@ -742,12 +743,14 @@ Tcl_Mutex *
TclpNewAllocMutex(void)
{
struct allocMutex *lockPtr;
+ register pthread_mutex_t *plockPtr;
lockPtr = malloc(sizeof(struct allocMutex));
if (lockPtr == NULL) {
Tcl_Panic("could not allocate lock");
}
- lockPtr->tlock = (Tcl_Mutex) &lockPtr->plock;
+ plockPtr = &lockPtr->plock;
+ lockPtr->tlock = (Tcl_Mutex) plockPtr;
pthread_mutex_init(&lockPtr->plock, NULL);
return &lockPtr->tlock;
}