From b2b65842ea9ba7c994385dfc82cf14d209713909 Mon Sep 17 00:00:00 2001 From: Andy Hochhaus Date: Sat, 8 Oct 2016 15:40:29 -0700 Subject: [PATCH] Silence compile warnings in bazel --- BUILD | 2 +- .../protobuf/compiler/cpp/cpp_message.cc | 2 +- src/google/protobuf/descriptor.pb.cc | 24 ++++++++++++------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/BUILD b/BUILD index 222cc82c80..1b8e92b076 100644 --- a/BUILD +++ b/BUILD @@ -14,7 +14,7 @@ COPTS = [ "-Wwrite-strings", "-Woverloaded-virtual", "-Wno-sign-compare", - "-Wno-error=unused-function", + "-Wno-unused-function", ] config_setting( diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc index 0034b1218f..1f1a0f1c55 100644 --- a/src/google/protobuf/compiler/cpp/cpp_message.cc +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc @@ -3804,7 +3804,7 @@ GenerateIsInitialized(io::Printer* printer) { if (descriptor_->extension_range_count() > 0) { printer->Print( "\n" - "if (!_extensions_.IsInitialized()) return false;"); + "if (!_extensions_.IsInitialized()) return false;\n"); } printer->Outdent(); diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 56c3b7fb24..13e8776ff9 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -8937,7 +8937,8 @@ bool FileOptions::IsInitialized() const { if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; - if (!_extensions_.IsInitialized()) return false; return true; + if (!_extensions_.IsInitialized()) return false; + return true; } void FileOptions::Swap(FileOptions* other) { @@ -9902,7 +9903,8 @@ bool MessageOptions::IsInitialized() const { if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; - if (!_extensions_.IsInitialized()) return false; return true; + if (!_extensions_.IsInitialized()) return false; + return true; } void MessageOptions::Swap(MessageOptions* other) { @@ -10601,7 +10603,8 @@ bool FieldOptions::IsInitialized() const { if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; - if (!_extensions_.IsInitialized()) return false; return true; + if (!_extensions_.IsInitialized()) return false; + return true; } void FieldOptions::Swap(FieldOptions* other) { @@ -11052,7 +11055,8 @@ bool OneofOptions::IsInitialized() const { if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; - if (!_extensions_.IsInitialized()) return false; return true; + if (!_extensions_.IsInitialized()) return false; + return true; } void OneofOptions::Swap(OneofOptions* other) { @@ -11446,7 +11450,8 @@ bool EnumOptions::IsInitialized() const { if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; - if (!_extensions_.IsInitialized()) return false; return true; + if (!_extensions_.IsInitialized()) return false; + return true; } void EnumOptions::Swap(EnumOptions* other) { @@ -11833,7 +11838,8 @@ bool EnumValueOptions::IsInitialized() const { if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; - if (!_extensions_.IsInitialized()) return false; return true; + if (!_extensions_.IsInitialized()) return false; + return true; } void EnumValueOptions::Swap(EnumValueOptions* other) { @@ -12195,7 +12201,8 @@ bool ServiceOptions::IsInitialized() const { if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; - if (!_extensions_.IsInitialized()) return false; return true; + if (!_extensions_.IsInitialized()) return false; + return true; } void ServiceOptions::Swap(ServiceOptions* other) { @@ -12557,7 +12564,8 @@ bool MethodOptions::IsInitialized() const { if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; - if (!_extensions_.IsInitialized()) return false; return true; + if (!_extensions_.IsInitialized()) return false; + return true; } void MethodOptions::Swap(MethodOptions* other) {