-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fails due to warnings C4267: '=': conversion from 'size_t' to 'uInt', possible loss of data #2711
Comments
Can you try turning off warning as errors? You can do this with this cmake flag: -DAWS_SDK_WARNINGS_ARE_ERRORS=OFF |
Yes, turning off warning as errors works, but ideally one shouldn't. |
Should be fixed with the above PR. Closing this issue. Please let me know if you are still seeing the above warning when building this sdk |
|
Describe the bug
strm.avail_in aws-sdk-cpp/src/aws-cpp-sdk-core/source/client/RequestCompression.cpp
has improper conversions at 2 locations:
Line 159:
strm.avail_in = (flush == Z_FINISH)?toRead-1:toRead; //skip EOF if included
and Line 280:
strm.avail_in = toRead;
Found when building custom client.
Worked around with adding #pragma warning(suppress: 4267) on the source.
Expected Behavior
Build should not fail
Current Behavior
Build fails when building custom clients with warning treated as error:
C4267: '=': conversion from 'size_t' to 'uInt', possible loss of data
Reproduction Steps
Build custom client with cmake ( flag -DLEGACY_BUILD=ON and -DADD_CUSTOM_CLIENTS=<your_service_name>)
Possible Solution
Fix the conversion issue
Additional Information/Context
No response
AWS CPP SDK version used
1.11.169
Compiler and Version used
Visual Studio 2022
Operating System and version
Windows 10
The text was updated successfully, but these errors were encountered: