From 3d56e7b9c3c0d4b29a9b74be6665c4c43c1d05d5 Mon Sep 17 00:00:00 2001 From: josch Date: Tue, 4 Nov 2014 11:02:10 +0100 Subject: [PATCH] 3rdparty/xdelta3-3.0.8: fix compiler warnings --- 3rdparty/xdelta3-3.0.8/xdelta3-decode.h | 2 ++ 3rdparty/xdelta3-3.0.8/xdelta3-hash.h | 3 +++ 3rdparty/xdelta3-3.0.8/xdelta3.c | 9 +++++++++ 3 files changed, 14 insertions(+) diff --git a/3rdparty/xdelta3-3.0.8/xdelta3-decode.h b/3rdparty/xdelta3-3.0.8/xdelta3-decode.h index c0cb578..25b89fd 100644 --- a/3rdparty/xdelta3-3.0.8/xdelta3-decode.h +++ b/3rdparty/xdelta3-3.0.8/xdelta3-decode.h @@ -554,6 +554,8 @@ xd3_decode_secondary_sections (xd3_stream *secondary_stream) return ret; } #undef DECODE_SECONDARY_SECTION +#else + (void)secondary_stream; #endif return 0; } diff --git a/3rdparty/xdelta3-3.0.8/xdelta3-hash.h b/3rdparty/xdelta3-3.0.8/xdelta3-hash.h index e359436..d33e39e 100644 --- a/3rdparty/xdelta3-3.0.8/xdelta3-hash.h +++ b/3rdparty/xdelta3-3.0.8/xdelta3-hash.h @@ -77,6 +77,7 @@ xd3_scksum (uint32_t *state, const uint8_t *base, const usize_t look) { + (void)look; UNALIGNED_READ32(state, base); return (*state) * hash_multiplier; } @@ -85,6 +86,7 @@ xd3_small_cksum_update (uint32_t *state, const uint8_t *base, usize_t look) { + (void)look; UNALIGNED_READ32(state, base+1); return (*state) * hash_multiplier; } @@ -158,6 +160,7 @@ xd3_size_hashtable (xd3_stream *stream, usize_t slots, xd3_hash_cfg *cfg) { + (void)stream; int bits = xd3_size_log2 (slots); /* TODO: there's a 32-bit assumption here */ diff --git a/3rdparty/xdelta3-3.0.8/xdelta3.c b/3rdparty/xdelta3-3.0.8/xdelta3.c index dffdf56..d34266a 100644 --- a/3rdparty/xdelta3-3.0.8/xdelta3.c +++ b/3rdparty/xdelta3-3.0.8/xdelta3.c @@ -2103,12 +2103,14 @@ xd3_decode_address (xd3_stream *stream, usize_t here, static void* __xd3_alloc_func (void* opaque, size_t items, usize_t size) { + (void)opaque; return malloc (items * (size_t) size); } static void __xd3_free_func (void* opaque, void* address) { + (void)opaque; free (address); } @@ -3262,6 +3264,7 @@ xd3_iopt_get_slot (xd3_stream *stream, xd3_rinst** iptr) static void xd3_iopt_erase (xd3_stream *stream, usize_t pos, usize_t size) { + (void)size; while (! xd3_rlist_empty (& stream->iopt_used)) { xd3_rinst *r = xd3_rlist_back (& stream->iopt_used); @@ -3340,6 +3343,8 @@ static int xd3_emit_double (xd3_stream *stream, xd3_rinst *first, xd3_rinst *second, usize_t code) { + (void)first; + (void)second; int ret; /* All double instructions use fixed sizes, so all we need to do is @@ -4047,6 +4052,7 @@ xd3_process_stream (int is_encode, usize_t *output_size, usize_t output_size_max) { + (void)is_encode; usize_t ipos = 0; usize_t n = min(stream->winsize, input_size); @@ -4118,6 +4124,7 @@ xd3_process_memory (int is_encode, usize_t *output_size, usize_t output_size_max, int flags) { + (void)close_stream; xd3_stream stream; xd3_config config; xd3_source src; @@ -4822,6 +4829,7 @@ xd3_scksum_insert (xd3_stream *stream, usize_t scksum, usize_t pos) { + (void)scksum; /* If we are maintaining previous duplicates. */ if (stream->small_prev) { @@ -4871,6 +4879,7 @@ xd3_smatch (xd3_stream *stream, usize_t scksum, usize_t *match_offset) { + (void)scksum; usize_t cmp_len; usize_t match_length = 0; usize_t chain = (stream->min_match == MIN_MATCH ?