aboutsummaryrefslogtreecommitdiff
path: root/src/xz/message.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2019-06-23 23:19:34 +0300
committerLasse Collin <lasse.collin@tukaani.org>2019-12-31 22:19:18 +0200
commit37df03ce52ce53710e1513387648763f8a744154 (patch)
tree8cf473cb950c8e2de1038a74e89057f7c3c01910 /src/xz/message.c
parenttuklib_cpucores: Silence warnings from -Wsign-conversion. (diff)
downloadxz-37df03ce52ce53710e1513387648763f8a744154.tar.xz
xz: Fix some of the warnings from -Wsign-conversion.
Diffstat (limited to 'src/xz/message.c')
-rw-r--r--src/xz/message.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xz/message.c b/src/xz/message.c
index 50a0b148..aa915d2d 100644
--- a/src/xz/message.c
+++ b/src/xz/message.c
@@ -440,8 +440,8 @@ progress_remaining(uint64_t in_pos, uint64_t elapsed)
// Calculate the estimate. Don't give an estimate of zero seconds,
// since it is possible that all the input has been already passed
// to the library, but there is still quite a bit of output pending.
- uint32_t remaining = (double)(expected_in_size - in_pos)
- * ((double)(elapsed) / 1000.0) / (double)(in_pos);
+ uint32_t remaining = (uint32_t)((double)(expected_in_size - in_pos)
+ * ((double)(elapsed) / 1000.0) / (double)(in_pos));
if (remaining < 1)
remaining = 1;