Skip to content

Commit 895de4a

Browse files
committed
Fix conversions
1 parent 402e65e commit 895de4a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/compress/zstd_compress_internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -997,15 +997,15 @@ ZSTD_count_2segments(const BYTE* ip, const BYTE* match,
997997
static size_t ZSTD_hashimpl(U64 u, U32 h, U64 s) {
998998
size_t hash;
999999
assert(h <= 64);
1000-
hash = ZSTD_COMPRESS_INTERNAL_CRC32_U64(s, u);
1000+
hash = (size_t)ZSTD_COMPRESS_INTERNAL_CRC32_U64((U32)s, u);
10011001
hash &= (1 << h) - 1;
10021002
return hash;
10031003
}
10041004

1005-
static UNUSED_ATTR U32 ZSTD_hash3(U32 u, U32 h, U32 s) { return ZSTD_hashimpl(u << (32 - 24), h, s); }
1005+
static UNUSED_ATTR size_t ZSTD_hash3(U32 u, U32 h, U32 s) { return ZSTD_hashimpl(u << (32 - 24), h, s); }
10061006
MEM_STATIC UNUSED_ATTR size_t ZSTD_hash3Ptr(const void* ptr, U32 h) { return ZSTD_hash3(MEM_readLE32(ptr), h, 0); } /* only in zstd_opt.h */
10071007

1008-
static UNUSED_ATTR U32 ZSTD_hash4(U32 u, U32 h, U32 s) { return ZSTD_hashimpl(u, h, s); }
1008+
static UNUSED_ATTR size_t ZSTD_hash4(U32 u, U32 h, U32 s) { return ZSTD_hashimpl(u, h, s); }
10091009
static UNUSED_ATTR size_t ZSTD_hash4Ptr(const void* ptr, U32 h) { return ZSTD_hash4(MEM_readLE32(ptr), h, 0); }
10101010

10111011
static UNUSED_ATTR size_t ZSTD_hash5(U64 u, U32 h, U64 s) { return ZSTD_hashimpl(u << (64-40), h, s); }

0 commit comments

Comments
 (0)