Fix `-Wconversion` warnings during compilation
Is there an existing proposal for this?
- [X] I have searched the existing proposals
Is your feature request related to a problem?
There are ~2900 -Wconversion warnings during compilation (out of ~3000 warnings in total). All or most of them are unprobable to cause any problems in our runtime.
But there are concerns:
- Really interesting warnings could be lost in this noise.
- Logs become larger in general.
- Prevents from zero-warning compilation.
Info to read: https://gcc.gnu.org/wiki/NewWconversion
Describe the solution you'd like
Some of these conversion warnings are straightforward to fix. While the scale of 2900 warnings is huge, it might be good to split the work into a smaller chunks: make changes to the simplest cases, on a file or several-files basis, no more than 5-10 changes per PR etc...
Alternatives you considered
Suppress -Wconversion warning during compilation to remove noise - but for me it's better to fix it
Contribution workflow
- Go to the Github Actions for this project: https://github.com/bloomberg/blazingmq/actions
- Find the nearest
mainbranch build - Open logs for
Build BlazingMQ - Ctrl+F
-Wconversionto find an intersting place to fix
Agreed here, most of these are due to small comparison, but there doesn't seem to be good tool for helping with applying fixes for these. Personally I think we might want to start by fixing the -Wconversion warnings in a package of mwc and work our way to bmq, mqb, and bmqbrkr from there.