* 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
+2000-07-02 Ezra Peisach <epeisach@engrailed.mit.edu>
+
+ * 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.
+
2000-07-01 Tom Yu <tlyu@mit.edu>
* clib/strerror.c: #include config.h.
*/
if (b.psize &&
(b.psize < MINPSIZE || b.psize > MAX_PAGE_OFFSET + 1 ||
- b.psize & sizeof(indx_t) - 1))
+ b.psize & (sizeof(indx_t) - 1)))
goto einval;
/* Minimum number of keys per page; absolute minimum is 2. */
if (m.magic != BTREEMAGIC || m.version != BTREEVERSION)
goto eftype;
if (m.psize < MINPSIZE || m.psize > MAX_PAGE_OFFSET + 1 ||
- m.psize & sizeof(indx_t) - 1)
+ m.psize & (sizeof(indx_t) - 1))
goto eftype;
if (m.flags & ~SAVEMETA)
goto eftype;
t->bt_psize = b.psize;
/* Set the cache size; must be a multiple of the page size. */
- if (b.cachesize && b.cachesize & b.psize - 1)
- b.cachesize += (~b.cachesize & b.psize - 1) + 1;
+ if (b.cachesize && b.cachesize & (b.psize - 1))
+ b.cachesize += (~b.cachesize & (b.psize - 1)) + 1;
if (b.cachesize < b.psize * MINCACHE)
b.cachesize = b.psize * MINCACHE;
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;
t->bt_last.pgno = h->pgno;
}
}
+ }
mpool_put(t->bt_mp, h, MPOOL_DIRTY);
* where we decide to try and copy too much onto the left page.
* Make sure that doesn't happen.
*/
- if (skip <= off && used + nbytes >= full || nxt == top - 1) {
+ if ((skip <= off && used + nbytes >= full) || nxt == top - 1) {
--off;
break;
}
DBM *db;
{
int status;
- datum retdata, retkey;
+ datum retkey;
#ifdef NEED_COPY
DBT k, r;
retkey.dptr = k.data;
retkey.dsize = k.size;
#else
+ datum retdata;
+
status = (db->seq)(db, (DBT *)&retkey, (DBT *)&retdata, R_FIRST);
#endif
if (status)
DBM *db;
{
int status;
- datum retdata, retkey;
+ datum retkey;
#ifdef NEED_COPY
DBT k, r;
retkey.dptr = k.data;
retkey.dsize = k.size;
#else
+ datum retdata;
+
status = (db->seq)(db, (DBT *)&retkey, (DBT *)&retdata, R_NEXT);
#endif
if (status)
int32_t nelem;
{
int32_t l2, nbuckets;
- db_pgno_t i;
/*
* Divide number of elements by the fill factor and determine a
#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. */
#define PRIME1 37
#define PRIME2 1048583
+#if 0
static u_int32_t
hash1(key, len)
const void *key;
}
return (n);
}
+#endif
+
/* Chris Torek's hash function. */
static u_int32_t
status = RET_ERROR;
#endif
- 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;
* SUCH DAMAGE.
*/
-#ifndef lint
+#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)rec_seq.c 8.3 (Berkeley) 7/14/94";
#endif /* not lint */