summaryrefslogtreecommitdiffstats
path: root/generic/tclHash.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-12-01 09:58:51 (GMT)
committernijtmans <nijtmans>2010-12-01 09:58:51 (GMT)
commitb6d1219a7a9fcdb49db66a4217f34bd79ba40bba (patch)
treeff3e45f716f97fd6829df5f3c3f6ff70710f2771 /generic/tclHash.c
parent79fc377e16fe1fb9074418c7fa5a4e06b9da28f4 (diff)
downloadtcl-b6d1219a7a9fcdb49db66a4217f34bd79ba40bba.zip
tcl-b6d1219a7a9fcdb49db66a4217f34bd79ba40bba.tar.gz
tcl-b6d1219a7a9fcdb49db66a4217f34bd79ba40bba.tar.bz2
fix gcc 64-bit warnings: cast from pointer to integer of different size
fix gcc(-4.5.2) warning: 'static' is not at beginning of declaration
Diffstat (limited to 'generic/tclHash.c')
-rw-r--r--generic/tclHash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclHash.c b/generic/tclHash.c
index 81f9326..e778104 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.46 2010/08/24 06:17:55 nijtmans Exp $
+ * RCS: @(#) $Id: tclHash.c,v 1.47 2010/12/01 09:58:52 nijtmans Exp $
*/
#include "tclInt.h"
@@ -37,7 +37,7 @@
*/
#define RANDOM_INDEX(tablePtr, i) \
- (((((long) (i))*1103515245) >> (tablePtr)->downShift) & (tablePtr)->mask)
+ ((((i)*1103515245L) >> (tablePtr)->downShift) & (tablePtr)->mask)
/*
* Prototypes for the array hash key methods.
@@ -436,7 +436,7 @@ Tcl_DeleteHashEntry(
#if TCL_HASH_KEY_STORE_HASH
if (typePtr->hashKeyProc == NULL
|| typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) {
- index = RANDOM_INDEX(tablePtr, entryPtr->hash);
+ index = RANDOM_INDEX(tablePtr, PTR2INT(entryPtr->hash));
} else {
index = PTR2UINT(entryPtr->hash) & tablePtr->mask;
}
@@ -1065,7 +1065,7 @@ RebuildTable(
#if TCL_HASH_KEY_STORE_HASH
if (typePtr->hashKeyProc == NULL
|| typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) {
- index = RANDOM_INDEX(tablePtr, hPtr->hash);
+ index = RANDOM_INDEX(tablePtr, PTR2INT(hPtr->hash));
} else {
index = PTR2UINT(hPtr->hash) & tablePtr->mask;
}