diff options
author | Jisi Liu <liujisi@google.com> | 2015-06-25 01:37:43 -0700 |
---|---|---|
committer | Jisi Liu <liujisi@google.com> | 2015-06-25 01:37:43 -0700 |
commit | d40a0db202433ba002a3e104165d4414e8929432 (patch) | |
tree | 4dad662c291937f6c9da705215549da4b017f7d5 | |
parent | eda912eeb3865f4c6f6896863bd1ea31a3ebbef8 (diff) | |
parent | 658e72d8fb7599d566e843070ec90f8d0c9141c5 (diff) | |
download | protobuf-d40a0db202433ba002a3e104165d4414e8929432.tar.gz protobuf-d40a0db202433ba002a3e104165d4414e8929432.tar.bz2 protobuf-d40a0db202433ba002a3e104165d4414e8929432.zip |
Merge pull request #540 from pherl/clean-warnings
fix compiler warnings.
-rw-r--r-- | src/google/protobuf/util/field_comparator.cc | 1 | ||||
-rw-r--r-- | src/google/protobuf/util/internal/type_info_test_helper.cc | 3 | ||||
-rw-r--r-- | src/google/protobuf/util/message_differencer.h | 13 |
3 files changed, 6 insertions, 11 deletions
diff --git a/src/google/protobuf/util/field_comparator.cc b/src/google/protobuf/util/field_comparator.cc index b7676a88..9f613265 100644 --- a/src/google/protobuf/util/field_comparator.cc +++ b/src/google/protobuf/util/field_comparator.cc @@ -106,6 +106,7 @@ FieldComparator::ComparisonResult DefaultFieldComparator::Compare( default: GOOGLE_LOG(FATAL) << "No comparison code for field " << field->full_name() << " of CppType = " << field->cpp_type(); + return DIFFERENT; } } diff --git a/src/google/protobuf/util/internal/type_info_test_helper.cc b/src/google/protobuf/util/internal/type_info_test_helper.cc index f7aea857..177b96e2 100644 --- a/src/google/protobuf/util/internal/type_info_test_helper.cc +++ b/src/google/protobuf/util/internal/type_info_test_helper.cc @@ -97,6 +97,7 @@ ProtoStreamObjectSource* TypeInfoTestHelper::NewProtoSource( } } GOOGLE_LOG(FATAL) << "Can not reach here."; + return NULL; } ProtoStreamObjectWriter* TypeInfoTestHelper::NewProtoWriter( @@ -110,6 +111,7 @@ ProtoStreamObjectWriter* TypeInfoTestHelper::NewProtoWriter( } } GOOGLE_LOG(FATAL) << "Can not reach here."; + return NULL; } DefaultValueObjectWriter* TypeInfoTestHelper::NewDefaultValueWriter( @@ -121,6 +123,7 @@ DefaultValueObjectWriter* TypeInfoTestHelper::NewDefaultValueWriter( } } GOOGLE_LOG(FATAL) << "Can not reach here."; + return NULL; } } // namespace testing diff --git a/src/google/protobuf/util/message_differencer.h b/src/google/protobuf/util/message_differencer.h index 05548897..e002a0f3 100644 --- a/src/google/protobuf/util/message_differencer.h +++ b/src/google/protobuf/util/message_differencer.h @@ -289,20 +289,11 @@ class LIBPROTOBUF_EXPORT MessageDifferencer { MapKeyComparator(); virtual ~MapKeyComparator(); - // The first IsMatch without parent_fields is only for backward - // compatibility. New users should override the second one instead. - // - // Deprecated. - // TODO(ykzhu): remove this function. - virtual bool IsMatch(const Message& message1, - const Message& message2) const { - GOOGLE_CHECK(false) << "This function shouldn't get called"; - return false; - } virtual bool IsMatch(const Message& message1, const Message& message2, const vector<SpecificField>& parent_fields) const { - return IsMatch(message1, message2); + GOOGLE_CHECK(false) << "IsMatch() is not implemented."; + return false; } private: |