From aa68d84998c8d1596cff8135490267fe5643d5dc Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 25 May 2002 11:05:07 +0000 Subject: Fixed printf format errors. Most of them are 64-bit daddr_t casualties. Printing daddr_t's using %d format was always an error, but gcc's warning about it was ignored for supported 64-bit arches and not printed for supported 32-bit arches. Hundreds if not thousands thousands of previously "fixed" daddr_t printings are now broken on 32-bit machines by casting daddr_t's to longs. daddr_t's should be printed using %jd format, but this fix uses %lld since %j is not implemented in the kernel yet. Fixed some nearby format printf errors (style bugs). --- sys/dev/ccd/ccd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/dev/ccd') diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c index bdb4043..415c0eb 100644 --- a/sys/dev/ccd/ccd.c +++ b/sys/dev/ccd/ccd.c @@ -947,8 +947,9 @@ ccdbuffer(struct ccdbuf **cb, struct ccd_s *cs, struct bio *bp, daddr_t bn, cadd #ifdef DEBUG if (ccddebug & CCDB_IO) - printf("ccdbuffer(%p, %p, %d, %p, %ld)\n", - cs, bp, bn, addr, bcount); + printf("ccdbuffer(%p, %p, %lld, %p, %ld)\n", + (void *)cs, (void *)bp, (long long)bn, (void *)addr, + bcount); #endif /* * Determine which component bn falls in. @@ -1741,8 +1742,9 @@ printiinfo(struct ccdiinfo *ii) int ix, i; for (ix = 0; ii->ii_ndisk; ix++, ii++) { - printf(" itab[%d]: #dk %d sblk %d soff %d", - ix, ii->ii_ndisk, ii->ii_startblk, ii->ii_startoff); + printf(" itab[%d]: #dk %d sblk %lld soff %lld", + ix, ii->ii_ndisk, (long long)ii->ii_startblk, + (long long)ii->ii_startoff); for (i = 0; i < ii->ii_ndisk; i++) printf(" %d", ii->ii_index[i]); printf("\n"); -- cgit v1.1