summaryrefslogtreecommitdiff
path: root/xdelta3/xdelta3-djw.h
diff options
context:
space:
mode:
authorJosh MacDonald <josh.macdonald@gmail.com>2014-10-18 23:24:50 -0700
committerJosh MacDonald <josh.macdonald@gmail.com>2014-10-18 23:24:50 -0700
commitbf0c8992055b4e66488a2b8de56c353c573268ac (patch)
treeeadf044444621d04c73e74f580b5d66a3a730bc9 /xdelta3/xdelta3-djw.h
parentee616b958d794c6714d117b22f0be6757b379d7e (diff)
Some -Wconversion cleanups
Diffstat (limited to 'xdelta3/xdelta3-djw.h')
-rw-r--r--xdelta3/xdelta3-djw.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/xdelta3/xdelta3-djw.h b/xdelta3/xdelta3-djw.h
index 422e06a..cba061e 100644
--- a/xdelta3/xdelta3-djw.h
+++ b/xdelta3/xdelta3-djw.h
@@ -343,7 +343,7 @@ static inline void
343djw_update_1_2 (int *mtf_run, usize_t *mtf_i, 343djw_update_1_2 (int *mtf_run, usize_t *mtf_i,
344 uint8_t *mtfsym, djw_weight *freq) 344 uint8_t *mtfsym, djw_weight *freq)
345{ 345{
346 int code; 346 uint8_t code;
347 347
348 do 348 do
349 { 349 {
@@ -395,10 +395,10 @@ djw_build_prefix (const djw_weight *freq, uint8_t *clen, usize_t asize, usize_t
395 usize_t heap_last; /* Index of the last _valid_ heap entry. */ 395 usize_t heap_last; /* Index of the last _valid_ heap entry. */
396 usize_t ents_size; /* Number of entries, including 0th fake entry */ 396 usize_t ents_size; /* Number of entries, including 0th fake entry */
397 usize_t overflow; /* Number of code lengths that overflow */ 397 usize_t overflow; /* Number of code lengths that overflow */
398 uint32_t total_bits; 398 usize_t total_bits;
399 usize_t i; 399 usize_t i;
400 400
401 IF_DEBUG (uint32_t first_bits = 0); 401 IF_DEBUG (usize_t first_bits = 0);
402 402
403 /* Insert real symbol frequences. */ 403 /* Insert real symbol frequences. */
404 for (i = 0; i < asize; i += 1) 404 for (i = 0; i < asize; i += 1)
@@ -444,7 +444,7 @@ djw_build_prefix (const djw_weight *freq, uint8_t *clen, usize_t asize, usize_t
444 if (heap_last == 1) 444 if (heap_last == 1)
445 { 445 {
446 /* Pick either the first or last symbol. */ 446 /* Pick either the first or last symbol. */
447 int s = freq[0] ? asize-1 : 0; 447 usize_t s = freq[0] ? asize-1 : 0;
448 ents[s+1].freq = 1; 448 ents[s+1].freq = 1;
449 goto again; 449 goto again;
450 } 450 }