diff options
author | Jim Meyering <meyering@redhat.com> | 2012-07-15 11:31:18 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-07-15 11:39:01 +0200 |
commit | 3c2973b86e70f184e95c4c87086095f52c2bb493 (patch) | |
tree | 8d2a48b1c09c994a343d6e53c3e7ee8fb4f4ef9a /src | |
parent | 5733f8f982e6d4e3a551edac7edf57c244a9b457 (diff) | |
download | coreutils-3c2973b86e70f184e95c4c87086095f52c2bb493.tar.xz |
build: shred.c: avoid i686-specific gcc -Wstrict-overflow warning
* src/shred.c: Avoid gcc -Wstrict-overflow warning.
Addresses http://bugs.gnu.org/11927
Diffstat (limited to 'src')
-rw-r--r-- | src/shred.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shred.c b/src/shred.c index 7a282601b..322bcf1f5 100644 --- a/src/shred.c +++ b/src/shred.c @@ -485,10 +485,11 @@ dopass (int fd, char const *qname, off_t *sizep, int type, offset += soff; + bool done = offset == size; + /* Time to print progress? */ - if (n - && ((offset == size && *previous_human_offset) - || thresh <= (now = time (NULL)))) + if (n && ((done && *previous_human_offset) + || thresh <= (now = time (NULL)))) { char offset_buf[LONGEST_HUMAN_READABLE + 1]; char size_buf[LONGEST_HUMAN_READABLE + 1]; @@ -498,8 +499,7 @@ dopass (int fd, char const *qname, off_t *sizep, int type, = human_readable (offset, offset_buf, human_floor | human_progress_opts, 1, 1); - if (offset == size - || !STREQ (previous_human_offset, human_offset)) + if (done || !STREQ (previous_human_offset, human_offset)) { if (size < 0) error (0, 0, _("%s: pass %lu/%lu (%s)...%s"), @@ -516,7 +516,7 @@ dopass (int fd, char const *qname, off_t *sizep, int type, = human_readable (size, size_buf, human_ceiling | human_progress_opts, 1, 1); - if (offset == size) + if (done) human_offset = human_size; error (0, 0, _("%s: pass %lu/%lu (%s)...%s/%s %d%%"), qname, k, n, pass_string, human_offset, human_size, |