diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2019-03-05 15:57:50 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2019-03-05 15:57:50 -0800 |
commit | 01569b8f5f2394c534c3aba7276caf22493fce82 (patch) | |
tree | 40d52cf2d4d76c1e1e5bf6443c34836627f4e5f9 /src/misc/zlib | |
parent | b632c8496cc48bb8be0851ea2c183f94c201f791 (diff) | |
download | abc-01569b8f5f2394c534c3aba7276caf22493fce82.tar.gz abc-01569b8f5f2394c534c3aba7276caf22493fce82.tar.bz2 abc-01569b8f5f2394c534c3aba7276caf22493fce82.zip |
Fixing some warnings by adding cast from 'int' to 'size_t' in memset, memcpy, etc.
Diffstat (limited to 'src/misc/zlib')
-rw-r--r-- | src/misc/zlib/deflate.c | 2 | ||||
-rw-r--r-- | src/misc/zlib/gzwrite.c | 2 | ||||
-rw-r--r-- | src/misc/zlib/zutil.h | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/misc/zlib/deflate.c b/src/misc/zlib/deflate.c index 04dcbf09..934196c8 100644 --- a/src/misc/zlib/deflate.c +++ b/src/misc/zlib/deflate.c @@ -1232,7 +1232,7 @@ local void check_match(deflate_state *s, IPos start, IPos match, int length) { /* check that the match is indeed a match */ if (zmemcmp(s->window + match, - s->window + start, length) != EQUAL) { + s->window + start, (size_t)length) != EQUAL) { fprintf(stderr, " start %u, match %u, length %d\n", start, match, length); do { diff --git a/src/misc/zlib/gzwrite.c b/src/misc/zlib/gzwrite.c index 44e116de..19015b44 100644 --- a/src/misc/zlib/gzwrite.c +++ b/src/misc/zlib/gzwrite.c @@ -128,7 +128,7 @@ local int gz_zero(gz_statep state, z_off64_t len) n = GT_OFF(state->size) || (z_off64_t)state->size > len ? (unsigned)len : state->size; if (first) { - memset(state->in, 0, n); + memset(state->in, 0, (size_t)n); first = 0; } strm->avail_in = n; diff --git a/src/misc/zlib/zutil.h b/src/misc/zlib/zutil.h index ad5dc411..26e37f31 100644 --- a/src/misc/zlib/zutil.h +++ b/src/misc/zlib/zutil.h @@ -239,11 +239,11 @@ ABC_NAMESPACE_HEADER_START # ifdef SMALL_MEDIUM /* MSDOS small or medium model */ # define zmemcpy _fmemcpy # define zmemcmp _fmemcmp -# define zmemzero(dest, len) _fmemset(dest, 0, len) +# define zmemzero(dest, len) _fmemset(dest, 0, (size_t)len) # else # define zmemcpy memcpy # define zmemcmp memcmp -# define zmemzero(dest, len) memset(dest, 0, len) +# define zmemzero(dest, len) memset(dest, 0, (size_t)len) # endif #else void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); |