summaryrefslogtreecommitdiffstats
path: root/src/util/db2/hash
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2000-07-03 03:43:42 +0000
committerEzra Peisach <epeisach@mit.edu>2000-07-03 03:43:42 +0000
commitbb57abf8209a1f33febc8bce060f974a5b777c83 (patch)
tree8c82fcf77499d75b9c5b8c40cb1d0c3602618de7 /src/util/db2/hash
parentee509b0a56eef92a7b738fa3b05b552ae46bdd83 (diff)
* recno/rec_seq.c: Include unused sccsid when LIBC_SCCS defined
* recno/rec_close.c (__rec_close): Explicit braces to avoid ambiguous `else' * btree/bt_split.c (bt_psplit): Parenthesis about && and || conditional. * btree/bt_put.c (__bt_put): Extra {} to make nested if/else unambiguous. * btree/bt_open.c (__bt_open): Add parenthesis to ensure precedence ordering. * hash/dbm.c (kdb2_dbm_firstkey): Conditionalize defintion of variables based on use. * hash/hash_func.c: Ifdef out unused static hash functions. * hash/hash.c (init_htab): Remove unused variable. gcc -Wall warnings. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12515 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/db2/hash')
-rw-r--r--src/util/db2/hash/dbm.c8
-rw-r--r--src/util/db2/hash/hash.c1
-rw-r--r--src/util/db2/hash/hash_func.c5
3 files changed, 11 insertions, 3 deletions
diff --git a/src/util/db2/hash/dbm.c b/src/util/db2/hash/dbm.c
index aa9676632..ac162982f 100644
--- a/src/util/db2/hash/dbm.c
+++ b/src/util/db2/hash/dbm.c
@@ -226,7 +226,7 @@ kdb2_dbm_firstkey(db)
DBM *db;
{
int status;
- datum retdata, retkey;
+ datum retkey;
#ifdef NEED_COPY
DBT k, r;
@@ -235,6 +235,8 @@ kdb2_dbm_firstkey(db)
retkey.dptr = k.data;
retkey.dsize = k.size;
#else
+ datum retdata;
+
status = (db->seq)(db, (DBT *)&retkey, (DBT *)&retdata, R_FIRST);
#endif
if (status)
@@ -252,7 +254,7 @@ kdb2_dbm_nextkey(db)
DBM *db;
{
int status;
- datum retdata, retkey;
+ datum retkey;
#ifdef NEED_COPY
DBT k, r;
@@ -261,6 +263,8 @@ kdb2_dbm_nextkey(db)
retkey.dptr = k.data;
retkey.dsize = k.size;
#else
+ datum retdata;
+
status = (db->seq)(db, (DBT *)&retkey, (DBT *)&retdata, R_NEXT);
#endif
if (status)
diff --git a/src/util/db2/hash/hash.c b/src/util/db2/hash/hash.c
index 0f51d6c9f..365bb415c 100644
--- a/src/util/db2/hash/hash.c
+++ b/src/util/db2/hash/hash.c
@@ -365,7 +365,6 @@ init_htab(hashp, nelem)
int32_t nelem;
{
int32_t l2, nbuckets;
- db_pgno_t i;
/*
* Divide number of elements by the fill factor and determine a
diff --git a/src/util/db2/hash/hash_func.c b/src/util/db2/hash/hash_func.c
index 0fddb4456..baded7fdb 100644
--- a/src/util/db2/hash/hash_func.c
+++ b/src/util/db2/hash/hash_func.c
@@ -45,9 +45,11 @@ static char sccsid[] = "@(#)hash_func.c 8.4 (Berkeley) 11/7/95";
#include "page.h"
#include "extern.h"
+#if 0
static u_int32_t hash1 __P((const void *, size_t));
static u_int32_t hash2 __P((const void *, size_t));
static u_int32_t hash3 __P((const void *, size_t));
+#endif
static u_int32_t hash4 __P((const void *, size_t));
/* Default hash function. */
@@ -62,6 +64,7 @@ u_int32_t (*__default_hash) __P((const void *, size_t)) = hash4;
#define PRIME1 37
#define PRIME2 1048583
+#if 0
static u_int32_t
hash1(key, len)
const void *key;
@@ -151,6 +154,8 @@ hash3(key, len)
}
return (n);
}
+#endif
+
/* Chris Torek's hash function. */
static u_int32_t