Avoid spurious warnings on *.pb.h
files with MSVC
#14507
Labels
type: cleanup
An internal cleanup or hygiene concern.
*.pb.h
files with MSVC
#14507
Files generated by Protobuf have warnings under MSVC. There is little we can do to fix the code to avoid warnings, and disabling the warnings for all the code would mask problems in our code.
We can disable warnings in headers with MSVC if the header is included as
#include <foo/bar.pb.h>
as opposed to#include "foo/bar.pb.h"
. We have managed to fix this for googleapis protos, and the compute protos, but the test protos ingoogle-cloud-cpp
are not.If we move the protos to
protos/...
(as oppposed togoogle/cloud/...
orgenerator/...
) then we can tweak Bazel and CMake to support include via angle brackets, then the warnings go away, and then we can start using newer versions of Protobuf with MSVC.The text was updated successfully, but these errors were encountered: