You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
process_zlib(): fix MSVC warning conversion from 'size_t' to 'uInt'
Since we use the `/WX` (treat warning as errors) option, this warning
currently blocks the build on Windows. This is the relevant excerpt from
the CI log:
```
ClCompile:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\CL.exe /c /ID:\a\kaitai_struct_cpp_stl_runtime\kaitai_struct_cpp_stl_runtime\build /ID:\a\kaitai_struct_cpp_stl_runtime\kaitai_struct_cpp_stl_runtime /Zi /nologo /W4 /WX /diagnostics:column /Od /Ob0 /D _WINDLL /D _MBCS /D WIN32 /D _WINDOWS /D KS_ZLIB /D KS_STR_ENCODING_WIN32API /D "CMAKE_INTDIR=\"Debug\"" /D kaitai_struct_cpp_stl_runtime_EXPORTS /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"kaitai_struct_cpp_stl_runtime.dir\Debug\\" /Fd"kaitai_struct_cpp_stl_runtime.dir\Debug\vc143.pdb" /external:W0 /Gd /TP /errorReport:queue /external:I "C:/vcpkg/installed/x64-windows/include" D:\a\kaitai_struct_cpp_stl_runtime\kaitai_struct_cpp_stl_runtime\kaitai\kaitaistream.cpp
kaitaistream.cpp
D:\a\kaitai_struct_cpp_stl_runtime\kaitai_struct_cpp_stl_runtime\kaitai\kaitaistream.cpp(686,32): error C2220: the following warning is treated as an error [D:\a\kaitai_struct_cpp_stl_runtime\kaitai_struct_cpp_stl_runtime\build\kaitai_struct_cpp_stl_runtime.vcxproj]
D:\a\kaitai_struct_cpp_stl_runtime\kaitai_struct_cpp_stl_runtime\kaitai\kaitaistream.cpp(686,32): warning C4267: '=': conversion from 'size_t' to 'uInt', possible loss of data [D:\a\kaitai_struct_cpp_stl_runtime\kaitai_struct_cpp_stl_runtime\build\kaitai_struct_cpp_stl_runtime.vcxproj]
```
See also https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4267?view=msvc-170
0 commit comments