bloomberg / blazingmq

A modern high-performance open source message queuing system
https://bloomberg.github.io/blazingmq/
Apache License 2.0
2.54k stars 132 forks source link

Fix `-Wconversion` warnings during compilation #87

Open 678098 opened 1 year ago

678098 commented 1 year ago

Is there an existing proposal for this?

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:

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

  1. Go to the Github Actions for this project: https://github.com/bloomberg/blazingmq/actions
  2. Find the nearest main branch build
  3. Open logs for Build BlazingMQ
  4. Ctrl+F -Wconversion to find an intersting place to fix
hallfox commented 1 year ago

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.