summaryrefslogtreecommitdiff
path: root/db/hash
diff options
context:
space:
mode:
Diffstat (limited to 'db/hash')
-rw-r--r--db/hash/hash.c7
-rw-r--r--db/hash/hash_bigkey.c6
2 files changed, 7 insertions, 6 deletions
diff --git a/db/hash/hash.c b/db/hash/hash.c
index 1f26c7e68a..db6fd69a4b 100644
--- a/db/hash/hash.c
+++ b/db/hash/hash.c
@@ -157,7 +157,8 @@ __hash_open(file, flags, mode, info, dflags)
if (hashp->VERSION != HASHVERSION &&
hashp->VERSION != OLDHASHVERSION)
RETURN_ERROR(EFTYPE, error1);
- if (hashp->hash(CHARKEY, sizeof(CHARKEY)) != hashp->H_CHARKEY)
+ if (hashp->hash(CHARKEY, sizeof(CHARKEY))
+ != (u_int32_t) hashp->H_CHARKEY)
RETURN_ERROR(EFTYPE, error1);
/*
* Figure out how many segments we need. Max_Bucket is the
@@ -744,7 +745,7 @@ hash_seq(dbp, key, data, flag)
for (bp = NULL; !bp || !bp[0]; ) {
if (!(bufp = hashp->cpage)) {
for (bucket = hashp->cbucket;
- bucket <= hashp->MAX_BUCKET;
+ bucket <= (u_int32_t) hashp->MAX_BUCKET;
bucket++, hashp->cndx = 1) {
bufp = __get_buf(hashp, bucket, NULL, 0);
if (!bufp)
@@ -848,7 +849,7 @@ __expand_table(hashp)
hashp->OVFL_POINT = spare_ndx;
}
- if (new_bucket > hashp->HIGH_MASK) {
+ if (new_bucket > (u_int32_t) hashp->HIGH_MASK) {
/* Starting a new doubling */
hashp->LOW_MASK = hashp->HIGH_MASK;
hashp->HIGH_MASK = new_bucket | hashp->LOW_MASK;
diff --git a/db/hash/hash_bigkey.c b/db/hash/hash_bigkey.c
index 578314a645..d2a7dfd597 100644
--- a/db/hash/hash_bigkey.c
+++ b/db/hash/hash_bigkey.c
@@ -147,7 +147,7 @@ __big_insert(hashp, bufp, key, val)
* Here's the hack to make sure that if the data ends on the
* same page as the key ends, FREESPACE is at least one.
*/
- if (space == val_size && val_size == val->size)
+ if ((int) space == val_size && (size_t) val_size == val->size)
move_bytes--;
off = OFFSET(p) - move_bytes;
memmove(cp + off, val_data, move_bytes);
@@ -431,7 +431,7 @@ __big_return(hashp, bufp, ndx, val, set_current)
}
val->size = collect_data(hashp, bufp, (int)len, set_current);
- if (val->size == -1)
+ if (val->size == (size_t) -1)
return (-1);
if (save_p->addr != save_addr) {
/* We are pretty short on buffers. */
@@ -510,7 +510,7 @@ __big_keydata(hashp, bufp, key, val, set)
int set;
{
key->size = collect_key(hashp, bufp, 0, val, set);
- if (key->size == -1)
+ if (key->size == (size_t) -1)
return (-1);
key->data = (u_char *)hashp->tmp_key;
return (0);