appease lint and gcc. (compile with -DDEBUG)
This commit is contained in:
parent
83e4df350a
commit
ec567cd38c
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: bt_debug.c,v 1.11 2004/06/20 22:20:14 jmc Exp $ */
|
/* $NetBSD: bt_debug.c,v 1.12 2006/01/24 17:24:37 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1990, 1993, 1994
|
* Copyright (c) 1990, 1993, 1994
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)bt_debug.c 8.5 (Berkeley) 8/17/94";
|
static char sccsid[] = "@(#)bt_debug.c 8.5 (Berkeley) 8/17/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: bt_debug.c,v 1.11 2004/06/20 22:20:14 jmc Exp $");
|
__RCSID("$NetBSD: bt_debug.c,v 1.12 2006/01/24 17:24:37 christos Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* LIBC_SCCS and not lint */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ __bt_dump(dbp)
|
||||||
BTREE *t;
|
BTREE *t;
|
||||||
PAGE *h;
|
PAGE *h;
|
||||||
pgno_t i;
|
pgno_t i;
|
||||||
char *sep;
|
const char *sep;
|
||||||
|
|
||||||
t = dbp->internal;
|
t = dbp->internal;
|
||||||
(void)fprintf(stderr, "%s: pgsz %d",
|
(void)fprintf(stderr, "%s: pgsz %d",
|
||||||
|
@ -108,9 +108,9 @@ __bt_dmpage(h)
|
||||||
PAGE *h;
|
PAGE *h;
|
||||||
{
|
{
|
||||||
BTMETA *m;
|
BTMETA *m;
|
||||||
char *sep;
|
const char *sep;
|
||||||
|
|
||||||
m = (BTMETA *)h;
|
m = (BTMETA *)(void *)h;
|
||||||
(void)fprintf(stderr, "magic %lx\n", (u_long) m->magic);
|
(void)fprintf(stderr, "magic %lx\n", (u_long) m->magic);
|
||||||
(void)fprintf(stderr, "version %lu\n", (u_long) m->version);
|
(void)fprintf(stderr, "version %lu\n", (u_long) m->version);
|
||||||
(void)fprintf(stderr, "psize %lu\n", (u_long) m->psize);
|
(void)fprintf(stderr, "psize %lu\n", (u_long) m->psize);
|
||||||
|
@ -167,7 +167,7 @@ __bt_dpage(h)
|
||||||
RINTERNAL *ri;
|
RINTERNAL *ri;
|
||||||
RLEAF *rl;
|
RLEAF *rl;
|
||||||
indx_t cur, top;
|
indx_t cur, top;
|
||||||
char *sep;
|
const char *sep;
|
||||||
|
|
||||||
(void)fprintf(stderr, " page %d: (", h->pgno);
|
(void)fprintf(stderr, " page %d: (", h->pgno);
|
||||||
#undef X
|
#undef X
|
||||||
|
@ -216,15 +216,15 @@ __bt_dpage(h)
|
||||||
if (bl->flags & P_BIGKEY)
|
if (bl->flags & P_BIGKEY)
|
||||||
(void)fprintf(stderr,
|
(void)fprintf(stderr,
|
||||||
"big key page %lu size %u/",
|
"big key page %lu size %u/",
|
||||||
(u_long) *(pgno_t *)bl->bytes,
|
(u_long) *(pgno_t *)(void *)bl->bytes,
|
||||||
*(u_int32_t *)(bl->bytes + sizeof(pgno_t)));
|
*(u_int32_t *)(void *)(bl->bytes + sizeof(pgno_t)));
|
||||||
else if (bl->ksize)
|
else if (bl->ksize)
|
||||||
(void)fprintf(stderr, "%s/", bl->bytes);
|
(void)fprintf(stderr, "%s/", bl->bytes);
|
||||||
if (bl->flags & P_BIGDATA)
|
if (bl->flags & P_BIGDATA)
|
||||||
(void)fprintf(stderr,
|
(void)fprintf(stderr,
|
||||||
"big data page %lu size %u",
|
"big data page %lu size %u",
|
||||||
(u_long) *(pgno_t *)(bl->bytes + bl->ksize),
|
(u_long) *(pgno_t *)(void *)(bl->bytes + bl->ksize),
|
||||||
*(u_int32_t *)(bl->bytes + bl->ksize +
|
*(u_int32_t *)(void *)(bl->bytes + bl->ksize +
|
||||||
sizeof(pgno_t)));
|
sizeof(pgno_t)));
|
||||||
else if (bl->dsize)
|
else if (bl->dsize)
|
||||||
(void)fprintf(stderr, "%.*s",
|
(void)fprintf(stderr, "%.*s",
|
||||||
|
@ -235,8 +235,8 @@ __bt_dpage(h)
|
||||||
if (rl->flags & P_BIGDATA)
|
if (rl->flags & P_BIGDATA)
|
||||||
(void)fprintf(stderr,
|
(void)fprintf(stderr,
|
||||||
"big data page %lu size %u",
|
"big data page %lu size %u",
|
||||||
(u_long) *(pgno_t *)rl->bytes,
|
(u_long) *(pgno_t *)(void *)rl->bytes,
|
||||||
*(u_int32_t *)(rl->bytes + sizeof(pgno_t)));
|
*(u_int32_t *)(void *)(rl->bytes + sizeof(pgno_t)));
|
||||||
else if (rl->dsize)
|
else if (rl->dsize)
|
||||||
(void)fprintf(stderr,
|
(void)fprintf(stderr,
|
||||||
"%.*s", (int)rl->dsize, rl->bytes);
|
"%.*s", (int)rl->dsize, rl->bytes);
|
||||||
|
|
Loading…
Reference in New Issue