1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-12 14:29:28 +00:00

use more proper format string.

Obtained from:	NetBSD via OpenBSD
This commit is contained in:
Xin LI 2009-03-23 23:22:09 +00:00
parent d2b227cd49
commit 7efabbb915
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190342
2 changed files with 11 additions and 11 deletions

View File

@ -61,7 +61,7 @@ __bt_dump(DB *dbp)
char *sep;
t = dbp->internal;
(void)fprintf(stderr, "%s: pgsz %d",
(void)fprintf(stderr, "%s: pgsz %u",
F_ISSET(t, B_INMEM) ? "memory" : "disk", t->bt_psize);
if (F_ISSET(t, R_RECNO))
(void)fprintf(stderr, " keys %u", t->bt_nrecs);
@ -157,7 +157,7 @@ __bt_dpage(PAGE *h)
indx_t cur, top;
char *sep;
(void)fprintf(stderr, " page %d: (", h->pgno);
(void)fprintf(stderr, " page %u: (", h->pgno);
#undef X
#define X(flag, name) \
if (h->flags & flag) { \
@ -174,7 +174,7 @@ __bt_dpage(PAGE *h)
(void)fprintf(stderr, ")\n");
#undef X
(void)fprintf(stderr, "\tprev %2d next %2d", h->prevpg, h->nextpg);
(void)fprintf(stderr, "\tprev %2u next %2u", h->prevpg, h->nextpg);
if (h->flags & P_OVERFLOW)
return;
@ -292,27 +292,27 @@ __bt_stat(DB *dbp)
(void)mpool_put(t->bt_mp, h, 0);
}
(void)fprintf(stderr, "%d level%s with %ld keys",
(void)fprintf(stderr, "%d level%s with %lu keys",
levels, levels == 1 ? "" : "s", nkeys);
if (F_ISSET(t, R_RECNO))
(void)fprintf(stderr, " (%d header count)", t->bt_nrecs);
(void)fprintf(stderr, " (%u header count)", t->bt_nrecs);
(void)fprintf(stderr,
"\n%u pages (leaf %d, internal %d, overflow %d)\n",
"\n%u pages (leaf %u, internal %u, overflow %u)\n",
pinternal + pleaf + pcont, pleaf, pinternal, pcont);
(void)fprintf(stderr, "%ld cache hits, %ld cache misses\n",
(void)fprintf(stderr, "%lu cache hits, %lu cache misses\n",
bt_cache_hit, bt_cache_miss);
(void)fprintf(stderr, "%lu splits (%lu root splits, %lu sort splits)\n",
bt_split, bt_rootsplit, bt_sortsplit);
pleaf *= t->bt_psize - BTDATAOFF;
if (pleaf)
(void)fprintf(stderr,
"%.0f%% leaf fill (%ld bytes used, %ld bytes free)\n",
"%.0f%% leaf fill (%lu bytes used, %lu bytes free)\n",
((double)(pleaf - lfree) / pleaf) * 100,
pleaf - lfree, lfree);
pinternal *= t->bt_psize - BTDATAOFF;
if (pinternal)
(void)fprintf(stderr,
"%.0f%% internal fill (%ld bytes used, %ld bytes free\n",
"%.0f%% internal fill (%lu bytes used, %lu bytes free\n",
((double)(pinternal - ifree) / pinternal) * 100,
pinternal - ifree, ifree);
if (bt_pfxsaved)

View File

@ -406,9 +406,9 @@ mpool_stat(MPOOL *mp)
int cnt;
char *sep;
(void)fprintf(stderr, "%u pages in the file\n", mp->npages);
(void)fprintf(stderr, "%lu pages in the file\n", mp->npages);
(void)fprintf(stderr,
"page size %lu, cacheing %u pages of %u page max cache\n",
"page size %lu, cacheing %lu pages of %lu page max cache\n",
mp->pagesize, mp->curcache, mp->maxcache);
(void)fprintf(stderr, "%lu page puts, %lu page gets, %lu page new\n",
mp->pageput, mp->pageget, mp->pagenew);