mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-24 22:17:32 +00:00
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc
|
|
index a066a6a7..636a864f 100644
|
|
--- a/src/google/protobuf/compiler/cpp/cpp_file.cc
|
|
+++ b/src/google/protobuf/compiler/cpp/cpp_file.cc
|
|
@@ -972,6 +972,11 @@ void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer,
|
|
"#ifndef PROTOBUF_$filename_identifier$__INCLUDED\n"
|
|
"#define PROTOBUF_$filename_identifier$__INCLUDED\n"
|
|
"\n"
|
|
+ "#ifdef _MSC_VER\n"
|
|
+ "#pragma warning(push)\n"
|
|
+ "#pragma warning(disable: 4800)\n"
|
|
+ "#endif // _MSC_VER\n"
|
|
+ "\n"
|
|
"#include <string>\n",
|
|
"filename", file_->name(), "filename_identifier", filename_identifier);
|
|
printer->Print("\n");
|
|
@@ -980,6 +985,10 @@ void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer,
|
|
void FileGenerator::GenerateBottomHeaderGuard(
|
|
io::Printer* printer, const string& filename_identifier) {
|
|
printer->Print(
|
|
+ "#ifdef _MSC_VER\n"
|
|
+ "#pragma warning(pop)\n"
|
|
+ "#endif // _MSC_VER\n"
|
|
+ "\n"
|
|
"#endif // PROTOBUF_$filename_identifier$__INCLUDED\n",
|
|
"filename_identifier", filename_identifier);
|
|
}
|