diff options
author | mux <mux@FreeBSD.org> | 2004-04-03 22:56:54 +0000 |
---|---|---|
committer | mux <mux@FreeBSD.org> | 2004-04-03 22:56:54 +0000 |
commit | 6ecbf96a8e71719b0c9a48754757c69efe3e07d9 (patch) | |
tree | 76bc8de6abf0ef8333e5f4da5808f88c2bd39633 | |
parent | 26232fd45ba22f38c070234b7a0bf1fe9b557c37 (diff) | |
download | FreeBSD-src-6ecbf96a8e71719b0c9a48754757c69efe3e07d9.zip FreeBSD-src-6ecbf96a8e71719b0c9a48754757c69efe3e07d9.tar.gz |
- 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.
-rw-r--r-- | sbin/growfs/growfs.c | 9 |
1 files changed, 5 insertions, 4 deletions
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; |