summaryrefslogtreecommitdiffstats
path: root/bin/dd/dd.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/dd.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/dd.c')
-rw-r--r--bin/dd/dd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/dd/dd.c b/bin/dd/dd.c
index 78558d2..92274f2 100644
--- a/bin/dd/dd.c
+++ b/bin/dd/dd.c
@@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$");
#include <err.h>
#include <errno.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
@@ -77,11 +78,11 @@ static void setup(void);
IO in, out; /* input/output state */
STAT st; /* statistics */
void (*cfunc)(void); /* conversion function */
-u_quad_t cpy_cnt; /* # of blocks to copy */
+uintmax_t cpy_cnt; /* # of blocks to copy */
static off_t pending = 0; /* pending seek if sparse */
-u_int ddflags; /* conversion options */
+u_int ddflags = 0; /* conversion options */
size_t cbsz; /* conversion block size */
-quad_t files_cnt = 1; /* # of files to copy */
+uintmax_t files_cnt = 1; /* # of files to copy */
const u_char *ctab; /* conversion table */
int
@@ -247,7 +248,7 @@ dd_in(void)
case 0:
break;
default:
- if (st.in_full + st.in_part >= (u_quad_t)cpy_cnt)
+ if (st.in_full + st.in_part >= (uintmax_t)cpy_cnt)
return;
break;
}
OpenPOWER on IntegriCloud