summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-09-28 16:29:25 +0000
committerJim Meyering <jim@meyering.net>2002-09-28 16:29:25 +0000
commit106025744633376a086a7fa2ab8f32a454840ef2 (patch)
treeeb33ef6f5fd06c04ce53e2df4ade68e4da01c1fb
parent475574011db63b2a80091e936d922198114184ab (diff)
downloadcoreutils-106025744633376a086a7fa2ab8f32a454840ef2.tar.xz
(dopass): Use a uintmax_t temporary to avoid bogus compiler warnings.
-rw-r--r--src/shred.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shred.c b/src/shred.c
index ced548308..51dad9e71 100644
--- a/src/shred.c
+++ b/src/shred.c
@@ -935,11 +935,12 @@ dopass (int fd, char const *qname, off_t *sizep, int type,
qname, k, n, pass_string, human_offset);
else
{
+ uintmax_t off = offset;
int percent = (size == 0
? 100
- : (offset <= TYPE_MAXIMUM (uintmax_t) / 100
- ? offset * (uintmax_t) 100 / size
- : offset / (size / 100)));
+ : (off <= TYPE_MAXIMUM (uintmax_t) / 100
+ ? off * 100 / size
+ : off / (size / 100)));
error (0, 0, _("%s: pass %lu/%lu (%s)...%s/%s %d%%"),
qname, k, n, pass_string, human_offset,
human_readable ((uintmax_t) size, size_buf, 1,