After running the protoc.exe which was built from source using the Ninja build instructions at https://github.com/grpc/grpc/blob/master/BUILDING.md the generated files are unable to compile with visual studio 2017 compiler when setting Warning level to 4 (/W4) and well as Treat warning as error (/WX) option enabled.
I am using master from https://github.com/grpc/grpc.git at commit
Windows
Compiling with MSVC 2017 + ninja
protoc.exe -I ..\proto --grpc_out=output --plugin=protoc-gen-grpc=grpc_cpp_plugin.exe test.proto WorkingDirectory="src\grpc.build"
protoc.exe -I ..\proto --cpp_out=output test.proto WorkingDirectory="src\grpc.build"
Compile cleanly in MSVC at error level 4 and treat warnings as errors turned on.
Compilation errors since treat warnings errors as and warning level 4 are specified.
https://github.com/grpc/grpc/issues/10725 looks similar but never resolved
I would love to see these warnings resolved too. It's super messy code that's being generated, and when you actually look at the code, I start seeing items where this mixed incompatible types -- and though no actual bug is happening, it's still a warning. Warnings should be eradicated!
Or at least stick some directives into your generated code to suppress the warnings you create.
https://docs.microsoft.com/en-us/cpp/preprocessor/warning?view=vs-2019
This issue/PR has been automatically marked as stale because it has not had any update (including commits, comments, labels, milestones, etc) for 30 days. It will be closed automatically if no further update occurs in 7 day. Thank you for your contributions!
Most helpful comment
I would love to see these warnings resolved too. It's super messy code that's being generated, and when you actually look at the code, I start seeing items where this mixed incompatible types -- and though no actual bug is happening, it's still a warning. Warnings should be eradicated!
Or at least stick some directives into your generated code to suppress the warnings you create.
https://docs.microsoft.com/en-us/cpp/preprocessor/warning?view=vs-2019