summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2022-03-28 10:50:16 -0700
committerEdward Thomson <ethomson@edwardthomson.com>2022-07-12 14:27:46 -0400
commitaf76267ad7a5fae5a8214ab587302dfc54c329d2 (patch)
treea7c90cc15ac4242b4c6d2f5fbfa51a72b9922d95 /deps
parent39ba0ee6045a68e657e074d8290b4b77baae72c0 (diff)
downloadlibgit2-af76267ad7a5fae5a8214ab587302dfc54c329d2.tar.gz
zlib: Silence some warnings from Visual Studio C.
Diffstat (limited to 'deps')
-rw-r--r--deps/zlib/deflate.h4
-rw-r--r--deps/zlib/trees.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/deps/zlib/deflate.h b/deps/zlib/deflate.h
index 17c226113..1a06cd5f2 100644
--- a/deps/zlib/deflate.h
+++ b/deps/zlib/deflate.h
@@ -329,8 +329,8 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
# define _tr_tally_dist(s, distance, length, flush) \
{ uch len = (uch)(length); \
ush dist = (ush)(distance); \
- s->sym_buf[s->sym_next++] = dist; \
- s->sym_buf[s->sym_next++] = dist >> 8; \
+ s->sym_buf[s->sym_next++] = (uch)dist; \
+ s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \
s->sym_buf[s->sym_next++] = len; \
dist--; \
s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
diff --git a/deps/zlib/trees.c b/deps/zlib/trees.c
index f73fd99c3..8b438cce4 100644
--- a/deps/zlib/trees.c
+++ b/deps/zlib/trees.c
@@ -1017,9 +1017,9 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
unsigned dist; /* distance of matched string */
unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
{
- s->sym_buf[s->sym_next++] = dist;
- s->sym_buf[s->sym_next++] = dist >> 8;
- s->sym_buf[s->sym_next++] = lc;
+ s->sym_buf[s->sym_next++] = (uch)dist;
+ s->sym_buf[s->sym_next++] = (uch)(dist >> 8);
+ s->sym_buf[s->sym_next++] = (uch)lc;
if (dist == 0) {
/* lc is the unmatched char */
s->dyn_ltree[lc].Freq++;