Closed Blast545 closed 1 year ago
We just wrap the offending headers in pragmas to disable these warnings, i.e.
We just wrap the offending headers in pragmas to disable these warnings, i.e.
@chapulina You mean for the offending headers inside the ignition stack? We don't have access to the ones internal to the protobuf library: https://build.osrfoundation.org/job/ign_gazebo-ign-5-win/52/msbuild/category.63474781/folder.140978115/
Ideally we should wrap only the 3rd party headers. For example:
But if I remember correctly, including some ign-msgs
headers still cause these protobuf warnings. If that's the case, we either find out how that's happening or wrap the ign-msgs
headers too, i.e.
protobuf should burn in hell
@wilderfield generally looking for productive input, if possible...
@mjcarroll ok, I guess use the following compiler flag when you build with protobuf on Windows, /wd4251
I think that is a better solution than littering code bases with windows specific pragmas.
I don't get why protobuf automatically generated files cause the visual studio compiler to go berserk with warnings.
:man_farmer: Spin-off for #1175
Environment
Description
Steps to reproduce
Run a Windows CI job for
ign-gazebo5
Output
Most of the warnings look like this:
I think the first step to clean the Windows warnings would be getting rid of the protobuf warnings. There's a list of documented warnings disabled on their code: https://github.com/protocolbuffers/protobuf/blob/master/cmake/README.md#notes-on-compiler-warnings
In particular, I'd like to get some input about disabling C4251 in the Windows farm, which currently causes 99 warnings on its own for the protobuf library. If it's ok I can open a PR to disable it, although I don't know if it's better if someone else looks at the 15 C4251 coming from
ign-gazebo
code. https://build.osrfoundation.org/job/ign_gazebo-ign-5-win/52/msbuild/category.63474781/ Has someone discussed about this warning in the past? @chapulina @j-rivero