diff options
author | johan <johan@FreeBSD.org> | 2003-11-14 13:07:38 +0000 |
---|---|---|
committer | johan <johan@FreeBSD.org> | 2003-11-14 13:07:38 +0000 |
commit | 58da18523c187fc34f2193d4654cba5b519eda11 (patch) | |
tree | a621221425b2efb37b2257eb7259a6491c489f74 /sbin/dump | |
parent | 0105a2bc6c8f670a5f1cb5eb2201dfdbd03b4349 (diff) | |
download | FreeBSD-src-58da18523c187fc34f2193d4654cba5b519eda11.zip FreeBSD-src-58da18523c187fc34f2193d4654cba5b519eda11.tar.gz |
Make this WARNS=2 clean by
- using (intmax_t) and %j
- giving a non-empty format string to msg()
Include <stdint.h> directly instead of depending on <inttypes.h>
to do it.
Tested by: make universe
Diffstat (limited to 'sbin/dump')
-rw-r--r-- | sbin/dump/Makefile | 1 | ||||
-rw-r--r-- | sbin/dump/dumprmt.c | 2 | ||||
-rw-r--r-- | sbin/dump/main.c | 7 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sbin/dump/Makefile b/sbin/dump/Makefile index 2dd6fda..608162a 100644 --- a/sbin/dump/Makefile +++ b/sbin/dump/Makefile @@ -16,7 +16,6 @@ PROG= dump LINKS= ${BINDIR}/dump ${BINDIR}/rdump CFLAGS+=-DRDUMP -WARNS= 0 SRCS= itime.c main.c optr.c dumprmt.c tape.c traverse.c unctime.c cache.c MAN= dump.8 MLINKS= dump.8 rdump.8 diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c index 85e811e..4b01beb 100644 --- a/sbin/dump/dumprmt.c +++ b/sbin/dump/dumprmt.c @@ -159,7 +159,7 @@ rmtgetconn(void) tuser = pwd->pw_name; if ((rmt = getenv("RMT")) == NULL) rmt = _PATH_RMT; - msg(""); + msg("%s", ""); rmtape = rcmd(&rmtpeer, (u_short)sp->s_port, pwd->pw_name, tuser, rmt, &errfd); if (rmtape < 0) { diff --git a/sbin/dump/main.c b/sbin/dump/main.c index 54ac7f0..7940063 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -62,9 +62,9 @@ static const char rcsid[] = #include <errno.h> #include <fcntl.h> #include <fstab.h> -#include <inttypes.h> #include <limits.h> #include <signal.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -545,8 +545,9 @@ main(int argc, char *argv[]) if (tend_writing - tstart_writing == 0) msg("finished in less than a second\n"); else - msg("finished in %d seconds, throughput %jd KBytes/sec\n", - tend_writing - tstart_writing, (intmax_t)(spcl.c_tapea / + msg("finished in %jd seconds, throughput %jd KBytes/sec\n", + (intmax_t)tend_writing - tstart_writing, + (intmax_t)(spcl.c_tapea / (tend_writing - tstart_writing))); putdumptime(); |