diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-12 02:19:50 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-12 02:19:50 +0100 |
commit | 8345b2bd5ea28bd8d07886e615b9c2d5ab35477d (patch) | |
tree | 35036ff7041727ad8edc3d3eee78d2bd6aef850e | |
parent | 48b6f59e19613d497148ecf1033ce75c74baa8a7 (diff) | |
download | busybox-w32-8345b2bd5ea28bd8d07886e615b9c2d5ab35477d.tar.gz busybox-w32-8345b2bd5ea28bd8d07886e615b9c2d5ab35477d.tar.bz2 busybox-w32-8345b2bd5ea28bd8d07886e615b9c2d5ab35477d.zip |
libbb: make warning go away
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | libbb/progress.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libbb/progress.c b/libbb/progress.c index df43dad5c..372feb0c2 100644 --- a/libbb/progress.c +++ b/libbb/progress.c | |||
@@ -127,10 +127,12 @@ void FAST_FUNC bb_progress_update(bb_progress_t *p, | |||
127 | /* 32-bit CPU and 64-bit off_t. | 127 | /* 32-bit CPU and 64-bit off_t. |
128 | * Use a 40-bit shift, it is easier to do on 32-bit CPU. | 128 | * Use a 40-bit shift, it is easier to do on 32-bit CPU. |
129 | */ | 129 | */ |
130 | if (totalsize >= (uoff_t)(1ULL << 54)) { | 130 | /* ONE suppresses "warning: shift count >= width of type" */ |
131 | totalsize = (uint32_t)(totalsize >> 32) >> 8; | 131 | #define ONE (sizeof(off_t) > 4) |
132 | beg_size = (uint32_t)(beg_size >> 32) >> 8; | 132 | if (totalsize >= (uoff_t)(1ULL << 54*ONE)) { |
133 | transferred = (uint32_t)(transferred >> 32) >> 8; | 133 | totalsize = (uint32_t)(totalsize >> 32*ONE) >> 8; |
134 | beg_size = (uint32_t)(beg_size >> 32*ONE) >> 8; | ||
135 | transferred = (uint32_t)(transferred >> 32*ONE) >> 8; | ||
134 | kiloscale = 4; | 136 | kiloscale = 4; |
135 | } | 137 | } |
136 | } | 138 | } |