diff options
author | Nathan Moinvaziri <nathan@nathanm.com> | 2020-10-01 22:49:28 -0700 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2020-11-02 17:01:58 +0100 |
commit | 020b5be33e379c16ee6f42733b8f3a0ea93ec3ff (patch) | |
tree | ecc309c6bdb704ba3fe7d332287ad4de103bbfb7 /insert_string_tpl.h | |
parent | 8d33736b031b10c4499bade95cdd22b0a1fb4ddb (diff) |
Fixed str uint32_t to uint16_t casting warnings in inflate_string_tpl.h
insert_string_tpl.h(50,26): warning C4244: '=': conversion from 'const uint32_t' to 'Pos', possible loss of data
insert_string_tpl.h(67,1): warning C4244: 'initializing': conversion from 'const uint32_t' to 'Pos', possible loss of data
Diffstat (limited to 'insert_string_tpl.h')
-rw-r--r-- | insert_string_tpl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/insert_string_tpl.h b/insert_string_tpl.h index 653bb96..9796e51 100644 --- a/insert_string_tpl.h +++ b/insert_string_tpl.h @@ -47,7 +47,7 @@ Z_INTERNAL Pos QUICK_INSERT_STRING(deflate_state *const s, const uint32_t str) { head = s->head[hm]; if (LIKELY(head != str)) { s->prev[str & s->w_mask] = head; - s->head[hm] = str; + s->head[hm] = (Pos)str; } return head; } @@ -64,7 +64,7 @@ Z_INTERNAL void INSERT_STRING(deflate_state *const s, const uint32_t str, uint32 uint8_t *strstart = s->window + str; uint8_t *strend = strstart + count - 1; /* last position */ - for (Pos idx = str; strstart <= strend; idx++, strstart++) { + for (Pos idx = (Pos)str; strstart <= strend; idx++, strstart++) { uint32_t val, hm, h = 0; #ifdef UNALIGNED_OK |