Date: Wed, 26 Jun 2002 01:05:41 +0200 (CEST) From: Dan Lukes <dan@obluda.cz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/39868: cleaning sbin/dump code from warnings Message-ID: <200206252305.g5PN5fOC055526@obluda.cz>
next in thread | raw e-mail | index | archive | help
>Number: 39868 >Category: bin >Synopsis: cleaning sbin/dump code from warnings >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 25 18:30:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Dan Lukes >Release: FreeBSD 4.6-STABLE i386 >Organization: Obludarium >Environment: System: FreeBSD xkulesh.vol.cz 4.6-STABLE FreeBSD src/sbin/dump/main.c,v 1.20.2.7 2002/02/23 22:32:51 src/sbin/dump/tape.c,v 1.12.2.3 2002/02/23 22:32:51 src/sbin/dump/traverse.c,v 1.10.2.4 2001/07/14 13:51:37 >Description: sbin/dump/main.c: In function `main': 343: warning: int format, long int arg (arg 2) dev_bsize is declared as long 476: warning: long int format, daddr_t arg (arg 2) spcl.c_tapea is ddaddr_t e.g. int32_t e.g. int 480: warning: long int format, daddr_t arg (arg 2) spcl.c_tapea is ddaddr_t e.g. int32_t e.g. int 488: warning: int format, time_t arg (arg 2) 488: warning: int format, long int arg (arg 3) time_t is long sbin/dump/tape.c: In function `tperror': 224: warning: int format, long int arg (arg 2) blocksthisvol is declared as long sbin/dump/traverse.c: In function `bread': 629: warning: int format, pointer arg (arg 3) disk is (char *) 648: warning: int format, long int arg (arg 5) dev_bsize is declared as long 652: warning: int format, long int arg (arg 4) dev_bsize is declared as long >How-To-Repeat: N/A >Fix: --- sbin/dump/main.c.ORIG Wed Jun 26 00:08:31 2002 +++ sbin/dump/main.c Wed Jun 26 00:19:29 2002 @@ -340,7 +340,7 @@ dev_bsize = sblock->fs_fsize / fsbtodb(sblock, 1); dev_bshift = ffs(dev_bsize) - 1; if (dev_bsize != (1 << dev_bshift)) - quit("dev_bsize (%d) is not a power of 2", dev_bsize); + quit("dev_bsize (%ld) is not a power of 2", dev_bsize); tp_bshift = ffs(TP_BSIZE) - 1; if (TP_BSIZE != (1 << tp_bshift)) quit("TP_BSIZE (%d) is not a power of 2", TP_BSIZE); @@ -473,9 +473,9 @@ for (i = 0; i < ntrec; i++) writeheader(maxino - 1); if (pipeout) - msg("DUMP: %ld tape blocks\n", spcl.c_tapea); + msg("DUMP: %d tape blocks\n", spcl.c_tapea); else - msg("DUMP: %ld tape blocks on %d volume%s\n", + msg("DUMP: %d tape blocks on %d volume%s\n", spcl.c_tapea, spcl.c_volume, (spcl.c_volume == 1) ? "" : "s"); @@ -483,7 +483,7 @@ if (tend_writing - tstart_writing == 0) msg("finished in less than a second\n"); else - msg("finished in %d seconds, throughput %d KBytes/sec\n", + msg("finished in %ld seconds, throughput %ld KBytes/sec\n", tend_writing - tstart_writing, spcl.c_tapea / (tend_writing - tstart_writing)); --- sbin/dump/tape.c.ORIG Sat Mar 2 14:43:00 2002 +++ sbin/dump/tape.c Wed Jun 26 00:49:20 2002 @@ -221,7 +221,7 @@ quit("Cannot recover\n"); /* NOTREACHED */ } - msg("write error %d blocks into volume %d\n", blocksthisvol, tapeno); + msg("write error %ld blocks into volume %d\n", blocksthisvol, tapeno); broadcast("DUMP WRITE ERROR!\n"); if (!query("Do you want to restart?")) dumpabort(0); --- sbin/dump/traverse.c.ORIG Sun Jul 15 21:10:05 2001 +++ sbin/dump/traverse.c Wed Jun 26 01:01:11 2002 @@ -625,7 +625,7 @@ msg("short read error from %s: [block %d]: count=%d, got=%d\n", disk, blkno, size, cnt); if (++breaderrors > BREADEMAX) { - msg("More than %d block read errors from %d\n", + msg("More than %d block read errors from %s\n", BREADEMAX, disk); broadcast("DUMP IS AILING!\n"); msg("This is an unrecoverable error.\n"); @@ -644,11 +644,11 @@ ((off_t)blkno << dev_bshift))) == dev_bsize) continue; if (cnt == -1) { - msg("read error from %s: %s: [sector %d]: count=%d\n", + msg("read error from %s: %s: [sector %d]: count=%ld\n", disk, strerror(errno), blkno, dev_bsize); continue; } - msg("short read error from %s: [sector %d]: count=%d, got=%d\n", + msg("short read error from %s: [sector %d]: count=%ld, got=%d\n", disk, blkno, dev_bsize, cnt); } } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206252305.g5PN5fOC055526>