Skip to content
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

Converting from size_t to int can result in data loss if the value of size_t exceeds the range that int can represent. #672

Open
megapixelrealestatecom opened this issue Sep 24, 2024 · 1 comment

Comments

@megapixelrealestatecom
Copy link

I just finished building v17 with the current Master but there are a couple of issues to addres, here is the output:

Build succeeded.
12>
12>C:\Coin-or\Clp\src\ClpParameters.hpp(84,22): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
12>C:\Coin-or\Cbc\src\CbcParameters.hpp(574,22): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
12>C:\Coin-or\CoinUtils\src\CoinHelperFunctions.hpp(360,19): warning C4244: 'argument': conversion from 'const CoinByteArray' to 'const CoinBigIndex', possible loss of data
12> 3 Warning(s)
12> 0 Error(s)
12>
12>Time Elapsed 00:00:04.21
========== Rebuild All: 12 succeeded, 0 failed, 0 skipped ==========
========== Rebuild completed at 4:51 PM and took 05:15.530 minutes ==========

@megapixelrealestatecom
Copy link
Author

These warnings indicate potential issues where data might be truncated or lost due to type conversions. Even though the build succeeded, addressing these warnings is important to avoid future bugs or runtime issues, especially when handling large data or different platforms (32-bit vs. 64-bit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant