summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjosh.macdonald <jmacd@users.noreply.github.com>2013-01-21 04:40:11 +0000
committerjosh.macdonald <jmacd@users.noreply.github.com>2013-01-21 04:40:11 +0000
commit50e06849fd4a6972f207fe6333d87cb8b459fe8e (patch)
treeca7dd26935d1014b87e8e5ba47ed61ba28fbba9a
parent6dab5fb9f9ecc61e2cecc227873df55542fc5bb5 (diff)
Further conversion cleanups.
-rw-r--r--xdelta3/xdelta3-hash.h2
-rw-r--r--xdelta3/xdelta3.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/xdelta3/xdelta3-hash.h b/xdelta3/xdelta3-hash.h
index cd579af..dd74734 100644
--- a/xdelta3/xdelta3-hash.h
+++ b/xdelta3/xdelta3-hash.h
@@ -141,7 +141,7 @@ xd3_size_log2 (size_t slots)
141 141
142 for (i = 3; i <= bits; i += 1) 142 for (i = 3; i <= bits; i += 1)
143 { 143 {
144 if (slots < (1U << i)) 144 if (slots < (1ULL << i))
145 { 145 {
146 /* TODO: this is compaction=1 in checksum_test.cc and maybe should 146 /* TODO: this is compaction=1 in checksum_test.cc and maybe should
147 * not be fixed at -1. */ 147 * not be fixed at -1. */
diff --git a/xdelta3/xdelta3.c b/xdelta3/xdelta3.c
index 319d8c1..1703f94 100644
--- a/xdelta3/xdelta3.c
+++ b/xdelta3/xdelta3.c
@@ -3696,8 +3696,8 @@ xd3_encode_init (xd3_stream *stream, int full_init)
3696 * identical or short inputs require no table allocation. */ 3696 * identical or short inputs require no table allocation. */
3697 if (large_comp) 3697 if (large_comp)
3698 { 3698 {
3699 usize_t hash_values = (stream->src->max_winsize / 3699 usize_t hash_values = (usize_t) (stream->src->max_winsize /
3700 stream->smatcher.large_step); 3700 (xoff_t) stream->smatcher.large_step);
3701 3701
3702 xd3_size_hashtable (stream, 3702 xd3_size_hashtable (stream,
3703 hash_values, 3703 hash_values,
@@ -4138,7 +4138,7 @@ xd3_process_memory (int is_encode,
4138 config.winsize = min(input_size, (usize_t) XD3_DEFAULT_WINSIZE); 4138 config.winsize = min(input_size, (usize_t) XD3_DEFAULT_WINSIZE);
4139 config.iopt_size = min(input_size / 32, XD3_DEFAULT_IOPT_SIZE); 4139 config.iopt_size = min(input_size / 32, XD3_DEFAULT_IOPT_SIZE);
4140 config.iopt_size = max(config.iopt_size, 128U); 4140 config.iopt_size = max(config.iopt_size, 128U);
4141 config.sprevsz = xd3_pow2_roundup (config.winsize); 4141 config.sprevsz = (usize_t) xd3_pow2_roundup (config.winsize);
4142 } 4142 }
4143 4143
4144 if ((ret = xd3_config_stream (&stream, &config)) != 0) 4144 if ((ret = xd3_config_stream (&stream, &config)) != 0)
@@ -4560,13 +4560,13 @@ xd3_source_match_setup (xd3_stream *stream, xoff_t srcpos)
4560 return 1; 4560 return 1;
4561} 4561}
4562 4562
4563static inline int 4563static inline xoff_t
4564xd3_forward_match(const uint8_t *s1c, const uint8_t *s2c, int n) 4564xd3_forward_match(const uint8_t *s1c, const uint8_t *s2c, xoff_t n)
4565{ 4565{
4566 int i = 0; 4566 int i = 0;
4567#if UNALIGNED_OK 4567#if UNALIGNED_OK
4568 const int isize = sizeof(int); 4568 const int isize = sizeof(int);
4569 int nint = n / isize; 4569 int nint = (int) (n / isize);
4570 4570
4571 if (nint >> 3) 4571 if (nint >> 3)
4572 { 4572 {
@@ -4721,8 +4721,8 @@ xd3_source_extend_match (xd3_stream *stream)
4721 stream->next_in + streamoff, 4721 stream->next_in + streamoff,
4722 tryrem); 4722 tryrem);
4723 tryoff += matched; 4723 tryoff += matched;
4724 streamoff += matched; 4724 streamoff += (xoff_t) matched;
4725 stream->match_fwd += matched; 4725 stream->match_fwd += (xoff_t) matched;
4726 4726
4727 if (tryrem != matched) 4727 if (tryrem != matched)
4728 { 4728 {