From 24e8eaf1919d34a5a9bf304cc01352cb2e6c0e39 Mon Sep 17 00:00:00 2001 From: Jaakko Heinonen Date: Thu, 17 Jun 2010 16:12:06 +0000 Subject: [PATCH] - Fix compilation of the subr_unit.c user space test program. - Use %zu for size_t in a few format strings. --- sys/kern/subr_unit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c index 4cd77b052ca5..553a640b72b3 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++) {