From 6ecbf96a8e71719b0c9a48754757c69efe3e07d9 Mon Sep 17 00:00:00 2001 From: mux Date: Sat, 3 Apr 2004 22:56:54 +0000 Subject: - Don't abuse caddr_t when what we really want is a void *. - Use the %jd format and a cast to intmax_t to print an int64_t. - The return type of getopt() is an int, not a char. This fixes some warnings but there's still much more work to do here. --- sbin/growfs/growfs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sbin/growfs') diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index def63ca..93de327 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -230,9 +230,10 @@ growfs(int fsi, int fso, unsigned int Nflag) * Dump out summary information about file system. */ # define B2MBFACTOR (1 / (1024.0 * 1024.0)) - printf("growfs: %.1fMB (%qd sectors) block size %d, fragment size %d\n", + printf("growfs: %.1fMB (%jd sectors) block size %d, fragment size %d\n", (float)sblock.fs_size * sblock.fs_fsize * B2MBFACTOR, - fsbtodb(&sblock, sblock.fs_size), sblock.fs_bsize, sblock.fs_fsize); + (intmax_t)fsbtodb(&sblock, sblock.fs_size), sblock.fs_bsize, + sblock.fs_fsize); printf("\tusing %d cylinder groups of %.2fMB, %d blks, %d inodes.\n", sblock.fs_ncg, (float)sblock.fs_fpg * sblock.fs_fsize * B2MBFACTOR, sblock.fs_fpg / sblock.fs_frag, sblock.fs_ipg); @@ -366,7 +367,7 @@ static void initcg(int cylno, time_t utime, int fso, unsigned int Nflag) { DBG_FUNC("initcg") - static caddr_t iobuf; + static void *iobuf; long d, dlower, dupper, blkno, start; ufs2_daddr_t i, cbase, dmax; struct ufs1_dinode *dp1; @@ -1940,7 +1941,7 @@ main(int argc, char **argv) { DBG_FUNC("main") char *device, *special, *cp; - char ch; + int ch; unsigned int size=0; size_t len; unsigned int Nflag=0; -- cgit v1.1