summaryrefslogtreecommitdiffstats
path: root/bin/dd/misc.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2003-02-27 18:04:54 +0000
committermarkm <markm@FreeBSD.org>2003-02-27 18:04:54 +0000
commit5736aa9039e290655a2484d65e3da9ab4033863d (patch)
treed203dbd769dc431349601f5d03ed08b57352472d /bin/dd/misc.c
parent5c7b43870b95aef3fdb86f420e387bc30f7fb1d5 (diff)
downloadFreeBSD-src-5736aa9039e290655a2484d65e3da9ab4033863d.zip
FreeBSD-src-5736aa9039e290655a2484d65e3da9ab4033863d.tar.gz
WARNS=4 fixes. This would be WARNS=9 if we were -std=99 instead of
-ansi, due to 'long long'. Reviewed by: green (slightly earlier version)
Diffstat (limited to 'bin/dd/misc.c')
-rw-r--r--bin/dd/misc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/dd/misc.c b/bin/dd/misc.c
index f95a811..e142009 100644
--- a/bin/dd/misc.c
+++ b/bin/dd/misc.c
@@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$");
#include <sys/time.h>
#include <errno.h>
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -68,21 +69,21 @@ summary(void)
secs = 1e-6;
/* Use snprintf(3) so that we don't reenter stdio(3). */
(void)snprintf(buf, sizeof(buf),
- "%qu+%qu records in\n%qu+%qu records out\n",
+ "%ju+%ju records in\n%ju+%ju records out\n",
st.in_full, st.in_part, st.out_full, st.out_part);
(void)write(STDERR_FILENO, buf, strlen(buf));
if (st.swab) {
- (void)snprintf(buf, sizeof(buf), "%qu odd length swab %s\n",
+ (void)snprintf(buf, sizeof(buf), "%ju odd length swab %s\n",
st.swab, (st.swab == 1) ? "block" : "blocks");
(void)write(STDERR_FILENO, buf, strlen(buf));
}
if (st.trunc) {
- (void)snprintf(buf, sizeof(buf), "%qu truncated %s\n",
+ (void)snprintf(buf, sizeof(buf), "%ju truncated %s\n",
st.trunc, (st.trunc == 1) ? "block" : "blocks");
(void)write(STDERR_FILENO, buf, strlen(buf));
}
(void)snprintf(buf, sizeof(buf),
- "%qu bytes transferred in %.6f secs (%.0f bytes/sec)\n",
+ "%ju bytes transferred in %.6f secs (%.0f bytes/sec)\n",
st.bytes, secs, st.bytes / secs);
(void)write(STDERR_FILENO, buf, strlen(buf));
}
OpenPOWER on IntegriCloud