diff options
Diffstat (limited to 'dbm/src/hash.c')
-rw-r--r-- | dbm/src/hash.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dbm/src/hash.c b/dbm/src/hash.c index 267ac0618..a3a0e90d9 100644 --- a/dbm/src/hash.c +++ b/dbm/src/hash.c @@ -232,7 +232,7 @@ __hash_open(const char *file, int flags, int mode, const HASHINFO *info, int dfl 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)) != (unsigned)hashp->H_CHARKEY) RETURN_ERROR(EFTYPE, error1); if (hashp->NKEYS < 0) { /* @@ -789,7 +789,7 @@ hash_access( if (bp[1] >= REAL_KEY) { /* Real key/data pair */ - if (size == off - *bp && + if (size == (unsigned)(off - *bp) && memcmp(kp, rbufp->page + *bp, size) == 0) goto found; off = bp[1]; @@ -933,7 +933,7 @@ hash_seq( for (bp = NULL; !bp || !bp[0]; ) { if (!(bufp = hashp->cpage)) { for (bucket = hashp->cbucket; - bucket <= hashp->MAX_BUCKET; + bucket <= (unsigned)hashp->MAX_BUCKET; bucket++, hashp->cndx = 1) { bufp = __get_buf(hashp, bucket, NULL, 0); if (!bufp) @@ -1037,7 +1037,7 @@ __expand_table(HTAB *hashp) hashp->OVFL_POINT = spare_ndx; } - if (new_bucket > hashp->HIGH_MASK) { + if (new_bucket > (unsigned)hashp->HIGH_MASK) { /* Starting a new doubling */ hashp->LOW_MASK = hashp->HIGH_MASK; hashp->HIGH_MASK = new_bucket | hashp->LOW_MASK; @@ -1073,7 +1073,7 @@ __call_hash(HTAB *hashp, char *k, size_t len) n = hashp->hash(k, len); bucket = n & hashp->HIGH_MASK; - if (bucket > hashp->MAX_BUCKET) + if (bucket > (unsigned)hashp->MAX_BUCKET) bucket = bucket & hashp->LOW_MASK; return (bucket); } |