summaryrefslogtreecommitdiffstats
path: root/Utilities/cmliblzma/liblzma/rangecoder
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmliblzma/liblzma/rangecoder')
-rw-r--r--Utilities/cmliblzma/liblzma/rangecoder/range_common.h7
-rw-r--r--Utilities/cmliblzma/liblzma/rangecoder/range_encoder.h3
2 files changed, 7 insertions, 3 deletions
diff --git a/Utilities/cmliblzma/liblzma/rangecoder/range_common.h b/Utilities/cmliblzma/liblzma/rangecoder/range_common.h
index 2c74dc1..f15623e 100644
--- a/Utilities/cmliblzma/liblzma/rangecoder/range_common.h
+++ b/Utilities/cmliblzma/liblzma/rangecoder/range_common.h
@@ -40,8 +40,11 @@
// This does the same for a complete bit tree.
// (A tree represented as an array.)
#define bittree_reset(probs, bit_levels) \
- for (uint32_t bt_i = 0; bt_i < (1 << (bit_levels)); ++bt_i) \
- bit_reset((probs)[bt_i])
+ do { \
+ uint32_t bt_i; \
+ for (bt_i = 0; bt_i < (1 << (bit_levels)); ++bt_i) \
+ bit_reset((probs)[bt_i]); \
+ } while (0)
//////////////////////
diff --git a/Utilities/cmliblzma/liblzma/rangecoder/range_encoder.h b/Utilities/cmliblzma/liblzma/rangecoder/range_encoder.h
index 1e1c369..e9614f2 100644
--- a/Utilities/cmliblzma/liblzma/rangecoder/range_encoder.h
+++ b/Utilities/cmliblzma/liblzma/rangecoder/range_encoder.h
@@ -115,7 +115,8 @@ rc_direct(lzma_range_encoder *rc,
static inline void
rc_flush(lzma_range_encoder *rc)
{
- for (size_t i = 0; i < 5; ++i)
+ size_t i;
+ for (i = 0; i < 5; ++i)
rc->symbols[rc->count++] = RC_FLUSH;
}