blueprint-freespeech / ricochet-refresh

Anonymous peer-to-peer instant messaging
https://www.ricochetrefresh.net
Other
157 stars 27 forks source link

Warnings with protobuf generated files makes it difficult to distinguish between warnings in our own code #141

Closed m-simonelli closed 2 years ago

m-simonelli commented 2 years ago

Protobuf generates .cpp files from the .proto files in src/libtego/protocol. As is common with machine-generated source files, there's a multitude of warnings (i.e. sign conversions, implicit demotion casts etc). Due to this, it's difficult to distinguish between real warnings in our own code (which most have been removed, but compilers newer than my own report more warnings, i.e. the ones used in ricochet-build)

To solve this, while preserving all warnings for our own code, we could add the proto files as a CMake subproject, build it as an object library, and then link that into libtego. It'd add a very marginal overhead to our configure phase, but should allow us to better check for warnings in our own code.

pospeselr commented 2 years ago

I suspect this won't be necessary long-term as we transition to libgosling and remove our protobuf dependency