diff options
Diffstat (limited to 'lib/libc/db')
-rw-r--r-- | lib/libc/db/btree/bt_put.c | 3 | ||||
-rw-r--r-- | lib/libc/db/btree/bt_split.c | 4 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_bigkey.c | 3 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_func.c | 6 | ||||
-rw-r--r-- | lib/libc/db/recno/rec_close.c | 3 | ||||
-rw-r--r-- | lib/libc/db/recno/rec_seq.c | 5 |
6 files changed, 14 insertions, 10 deletions
diff --git a/lib/libc/db/btree/bt_put.c b/lib/libc/db/btree/bt_put.c index 4e1e89b..ea12bc0 100644 --- a/lib/libc/db/btree/bt_put.c +++ b/lib/libc/db/btree/bt_put.c @@ -225,7 +225,7 @@ delete: if (__bt_dleaf(t, key, h, index) == RET_ERROR) { t->bt_cursor.pg.pgno == h->pgno && t->bt_cursor.pg.index >= index) ++t->bt_cursor.pg.index; - if (t->bt_order == NOT) + if (t->bt_order == NOT) { if (h->nextpg == P_INVALID) { if (index == NEXTINDEX(h) - 1) { t->bt_order = FORWARD; @@ -239,6 +239,7 @@ delete: if (__bt_dleaf(t, key, h, index) == RET_ERROR) { t->bt_last.pgno = h->pgno; } } + } mpool_put(t->bt_mp, h, MPOOL_DIRTY); diff --git a/lib/libc/db/btree/bt_split.c b/lib/libc/db/btree/bt_split.c index d9ec874..9112ec8 100644 --- a/lib/libc/db/btree/bt_split.c +++ b/lib/libc/db/btree/bt_split.c @@ -672,8 +672,8 @@ bt_psplit(t, h, l, r, pskip, ilen) * where we decide to try and copy too much onto the left page. * Make sure that doesn't happen. */ - if (skip <= off && - used + nbytes + sizeof(indx_t) >= full || nxt == top - 1) { + if ((skip <= off && used + nbytes + sizeof(indx_t) >= full) + || nxt == top - 1) { --off; break; } diff --git a/lib/libc/db/hash/hash_bigkey.c b/lib/libc/db/hash/hash_bigkey.c index 3465802..c70b375 100644 --- a/lib/libc/db/hash/hash_bigkey.c +++ b/lib/libc/db/hash/hash_bigkey.c @@ -123,7 +123,7 @@ __big_insert(hashp, bufp, key, val) if (!bufp) return (-1); n = p[0]; - if (!key_size) + if (!key_size) { if (FREESPACE(p)) { move_bytes = MIN(FREESPACE(p), val_size); off = OFFSET(p) - move_bytes; @@ -136,6 +136,7 @@ __big_insert(hashp, bufp, key, val) OFFSET(p) = off; } else p[n - 2] = FULL_KEY; + } p = (u_int16_t *)bufp->page; cp = bufp->page; bufp->flags |= BUF_MOD; diff --git a/lib/libc/db/hash/hash_func.c b/lib/libc/db/hash/hash_func.c index fd5f365..194c872 100644 --- a/lib/libc/db/hash/hash_func.c +++ b/lib/libc/db/hash/hash_func.c @@ -47,9 +47,9 @@ __FBSDID("$FreeBSD$"); #include "page.h" #include "extern.h" -static u_int32_t hash1(const void *, size_t); -static u_int32_t hash2(const void *, size_t); -static u_int32_t hash3(const void *, size_t); +static u_int32_t hash1(const void *, size_t) __unused; +static u_int32_t hash2(const void *, size_t) __unused; +static u_int32_t hash3(const void *, size_t) __unused; static u_int32_t hash4(const void *, size_t); /* Global default hash function */ diff --git a/lib/libc/db/recno/rec_close.c b/lib/libc/db/recno/rec_close.c index 2246c5b..326a943 100644 --- a/lib/libc/db/recno/rec_close.c +++ b/lib/libc/db/recno/rec_close.c @@ -83,13 +83,14 @@ __rec_close(dbp) if (F_ISSET(t, R_MEMMAPPED) && munmap(t->bt_smap, t->bt_msize)) status = RET_ERROR; - if (!F_ISSET(t, R_INMEM)) + if (!F_ISSET(t, R_INMEM)) { if (F_ISSET(t, R_CLOSEFP)) { if (fclose(t->bt_rfp)) status = RET_ERROR; } else if (_close(t->bt_rfd)) status = RET_ERROR; + } if (__bt_close(dbp) == RET_ERROR) status = RET_ERROR; diff --git a/lib/libc/db/recno/rec_seq.c b/lib/libc/db/recno/rec_seq.c index bf95b8c..b75d44e 100644 --- a/lib/libc/db/recno/rec_seq.c +++ b/lib/libc/db/recno/rec_seq.c @@ -31,10 +31,11 @@ * SUCH DAMAGE. */ +#include <sys/cdefs.h> #ifndef lint -static char sccsid[] = "@(#)rec_seq.c 8.3 (Berkeley) 7/14/94"; +/* XXX use __SCCSID */ +static char sccsid[] __unused = "@(#)rec_seq.c 8.3 (Berkeley) 7/14/94"; #endif /* not lint */ -#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #include <sys/types.h> |