From: Jim Meyering Date: Sat, 28 Sep 2002 16:29:25 +0000 (+0000) Subject: (dopass): Use a uintmax_t temporary to avoid bogus compiler warnings. X-Git-Tag: v4.5.2~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=106025744633376a086a7fa2ab8f32a454840ef2;p=thirdparty%2Fcoreutils.git (dopass): Use a uintmax_t temporary to avoid bogus compiler warnings. --- diff --git a/src/shred.c b/src/shred.c index ced5483080..51dad9e71c 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,