summaryrefslogtreecommitdiffstats
path: root/generic/tclHash.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-06-08 18:52:01 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-06-08 18:52:01 (GMT)
commit95199c5bd3068d26758129488d106f3c88f67fb6 (patch)
tree86c11f5813dbd63f36dde306011a2033c31bf523 /generic/tclHash.c
parent8faa7d16a6d0a767179b62646edb7547308aac64 (diff)
downloadtcl-95199c5bd3068d26758129488d106f3c88f67fb6.zip
tcl-95199c5bd3068d26758129488d106f3c88f67fb6.tar.gz
tcl-95199c5bd3068d26758129488d106f3c88f67fb6.tar.bz2
Fix variable usage warning. [Bug 969068]
Diffstat (limited to 'generic/tclHash.c')
-rw-r--r--generic/tclHash.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/generic/tclHash.c b/generic/tclHash.c
index 360acfe..952d6df 100644
--- a/generic/tclHash.c
+++ b/generic/tclHash.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclHash.c,v 1.19 2004/05/27 13:18:53 dkf Exp $
+ * RCS: @(#) $Id: tclHash.c,v 1.20 2004/06/08 18:52:02 dkf Exp $
*/
#include "tclInt.h"
@@ -1147,7 +1147,6 @@ RebuildTable(tablePtr)
register Tcl_HashEntry **oldChainPtr, **newChainPtr;
register Tcl_HashEntry *hPtr;
Tcl_HashKeyType *typePtr;
- VOID *key;
#if TCL_PRESERVE_BINARY_COMPATABILITY
if (tablePtr->keyType == TCL_STRING_KEYS) {
@@ -1195,9 +1194,6 @@ RebuildTable(tablePtr)
for (oldChainPtr = oldBuckets; oldSize > 0; oldSize--, oldChainPtr++) {
for (hPtr = *oldChainPtr; hPtr != NULL; hPtr = *oldChainPtr) {
*oldChainPtr = hPtr->nextPtr;
-
- key = (VOID *) Tcl_GetHashKey (tablePtr, hPtr);
-
#if TCL_HASH_KEY_STORE_HASH
if (typePtr->hashKeyProc == NULL
|| typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) {
@@ -1208,6 +1204,8 @@ RebuildTable(tablePtr)
hPtr->nextPtr = tablePtr->buckets[index];
tablePtr->buckets[index] = hPtr;
#else
+ VOID *key = (VOID *) Tcl_GetHashKey (tablePtr, hPtr);
+
if (typePtr->hashKeyProc) {
unsigned int hash;
hash = typePtr->hashKeyProc (tablePtr, (VOID *) key);