Sync from Piper @359788468 PROTOBUF_SYNC_PIPER
diff --git a/conformance/binary_json_conformance_suite.cc b/conformance/binary_json_conformance_suite.cc index 4a0d8e8..48bfa96 100644 --- a/conformance/binary_json_conformance_suite.cc +++ b/conformance/binary_json_conformance_suite.cc
@@ -300,7 +300,7 @@ } string UpperCase(string str) { - for (int i = 0; i < str.size(); i++) { + for (size_t i = 0; i < str.size(); i++) { str[i] = toupper(str[i]); } return str;
diff --git a/conformance/conformance_cpp.cc b/conformance/conformance_cpp.cc index 9546518..d27612b 100644 --- a/conformance/conformance_cpp.cc +++ b/conformance/conformance_cpp.cc
@@ -55,6 +55,7 @@ using google::protobuf::util::NewTypeResolverForDescriptorPool; using google::protobuf::util::TypeResolver; using protobuf_test_messages::proto3::TestAllTypesProto3; +using protobuf_test_messages::proto2::TestAllTypesProto2; using std::string; static const char kTypeUrlPrefix[] = "type.googleapis.com"; @@ -102,6 +103,8 @@ void DoTest(const ConformanceRequest& request, ConformanceResponse* response) { Message *test_message; + google::protobuf::LinkMessageReflection<TestAllTypesProto2>(); + google::protobuf::LinkMessageReflection<TestAllTypesProto3>(); const Descriptor *descriptor = DescriptorPool::generated_pool()->FindMessageTypeByName( request.message_type()); if (!descriptor) {
diff --git a/conformance/conformance_test_runner.cc b/conformance/conformance_test_runner.cc index 9f893cb..1572ac0 100644 --- a/conformance/conformance_test_runner.cc +++ b/conformance/conformance_test_runner.cc
@@ -297,7 +297,7 @@ std::vector<const char *> argv; argv.push_back(executable.get()); - for (int i = 0; i < executable_args_.size(); ++i) { + for (size_t i = 0; i < executable_args_.size(); ++i) { argv.push_back(executable_args_[i].c_str()); } argv.push_back(nullptr); @@ -307,7 +307,7 @@ } void ForkPipeRunner::CheckedWrite(int fd, const void *buf, size_t len) { - if (write(fd, buf, len) != len) { + if (static_cast<size_t>(write(fd, buf, len)) != len) { GOOGLE_LOG(FATAL) << current_test_name_ << ": error writing to test program: " << strerror(errno); }