diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2021-03-19 22:34:32 +0100 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2021-03-22 10:30:43 +0100 |
commit | 0836e24348ed8cd10fafcf762616a80ce14ef7e9 (patch) | |
tree | 5360e7613477a1c91f910c33d22c3245ab4187a3 /test | |
parent | 8e0f38cdd368d9a9bca826544bdb7bdea1fc73f3 (diff) |
Fix MSVC warnings in deflate_quick_block_open
Add casts in order to fix the following warnings [1]:
C:\Users\Nathan\Source\zlib-ng\test\deflate_quick_block_open.c(62,69): warning C4244: '=': conversion from '__int64' to
'uint32_t', possible loss of data [C:\Users\Nathan\Source\zlib-ng\deflate_quick_block_open.vcxproj]
C:\Users\Nathan\Source\zlib-ng\test\deflate_quick_block_open.c(73,1): warning C4244: 'initializing': conversion from '_
_int64' to 'uint32_t', possible loss of data [C:\Users\Nathan\Source\zlib-ng\deflate_quick_block_open.vcxproj]
[1] https://github.com/zlib-ng/zlib-ng/pull/880#issuecomment-802432700
Diffstat (limited to 'test')
-rw-r--r-- | test/deflate_quick_block_open.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/deflate_quick_block_open.c b/test/deflate_quick_block_open.c index 42a3c20..9526533 100644 --- a/test/deflate_quick_block_open.c +++ b/test/deflate_quick_block_open.c @@ -59,7 +59,7 @@ int main() { strm.avail_in = sizeof(next_in); while (1) { - strm.avail_out = next_out + sizeof(next_out) - strm.next_out; + strm.avail_out = (uint32_t)(next_out + sizeof(next_out) - strm.next_out); if (strm.avail_out > 38) strm.avail_out = 38; ret = PREFIX(deflate)(&strm, Z_FINISH); @@ -70,7 +70,7 @@ int main() { return EXIT_FAILURE; } } - uint32_t compressed_size = strm.next_out - next_out; + uint32_t compressed_size = (uint32_t)(strm.next_out - next_out); ret = PREFIX(deflateEnd)(&strm); if (ret != Z_OK) { |