summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_unit.c
diff options
context:
space:
mode:
authorjh <jh@FreeBSD.org>2010-06-17 16:12:06 +0000
committerjh <jh@FreeBSD.org>2010-06-17 16:12:06 +0000
commit8a203f841cbfa663831d60d915af0900f300fabb (patch)
treeea858e5f1ddfef90bd57aceaef81bb059f39b234 /sys/kern/subr_unit.c
parentd721395aa6a38edc8cf6c161bc5e45c2ff3042a2 (diff)
downloadFreeBSD-src-8a203f841cbfa663831d60d915af0900f300fabb.zip
FreeBSD-src-8a203f841cbfa663831d60d915af0900f300fabb.tar.gz
- Fix compilation of the subr_unit.c user space test program.
- Use %zu for size_t in a few format strings.
Diffstat (limited to 'sys/kern/subr_unit.c')
-rw-r--r--sys/kern/subr_unit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c
index 4cd77b0..553a640 100644
--- a/sys/kern/subr_unit.c
+++ b/sys/kern/subr_unit.c
@@ -153,6 +153,7 @@ mtx_assert(struct mtx *mp, int flag)
}
#define CTASSERT(foo)
+#define WITNESS_WARN(flags, lock, fmt, ...) (void)0
#endif /* USERLAND */
@@ -825,9 +826,9 @@ main(int argc __unused, const char **argv __unused)
memset(a, 0, sizeof a);
- fprintf(stderr, "sizeof(struct unr) %d\n", sizeof (struct unr));
- fprintf(stderr, "sizeof(struct unrb) %d\n", sizeof (struct unrb));
- fprintf(stderr, "sizeof(struct unrhdr) %d\n", sizeof (struct unrhdr));
+ fprintf(stderr, "sizeof(struct unr) %zu\n", sizeof(struct unr));
+ fprintf(stderr, "sizeof(struct unrb) %zu\n", sizeof(struct unrb));
+ fprintf(stderr, "sizeof(struct unrhdr) %zu\n", sizeof(struct unrhdr));
fprintf(stderr, "NBITS %d\n", NBITS);
x = 1;
for (m = 0; m < NN * 100; m++) {
OpenPOWER on IntegriCloud