diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.h b/src/google/protobuf/compiler/cpp/cpp_helpers.h index 5fa019d216bc..b53c46f86fbc 100644 --- a/src/google/protobuf/compiler/cpp/cpp_helpers.h +++ b/src/google/protobuf/compiler/cpp/cpp_helpers.h @@ -59,7 +59,7 @@ namespace protobuf { namespace compiler { namespace cpp { -inline std::string ProtobufNamespace(const Options& options) { +inline std::string ProtobufNamespace(const Options& /* options */) { return "PROTOBUF_NAMESPACE_ID"; } @@ -67,12 +67,12 @@ inline std::string MacroPrefix(const Options& options) { return options.opensource_runtime ? "GOOGLE_PROTOBUF" : "GOOGLE_PROTOBUF"; } -inline std::string DeprecatedAttribute(const Options& options, +inline std::string DeprecatedAttribute(const Options& /* options */, const FieldDescriptor* d) { return d->options().deprecated() ? "PROTOBUF_DEPRECATED " : ""; } -inline std::string DeprecatedAttribute(const Options& options, +inline std::string DeprecatedAttribute(const Options& /* options */, const EnumValueDescriptor* d) { return d->options().deprecated() ? "PROTOBUF_DEPRECATED_ENUM " : ""; } @@ -345,7 +345,7 @@ inline bool IsLazy(const FieldDescriptor* field, const Options& options) { !options.opensource_runtime; } -inline bool IsFieldUsed(const FieldDescriptor* field, const Options& options) { +inline bool IsFieldUsed(const FieldDescriptor* /* field */, const Options& /* options */) { return true; } diff --git a/src/google/protobuf/compiler/importer.h b/src/google/protobuf/compiler/importer.h index db4a876c5bb6..6cdae8a12d26 100644 --- a/src/google/protobuf/compiler/importer.h +++ b/src/google/protobuf/compiler/importer.h @@ -202,8 +202,8 @@ class PROTOBUF_EXPORT MultiFileErrorCollector { virtual void AddError(const std::string& filename, int line, int column, const std::string& message) = 0; - virtual void AddWarning(const std::string& filename, int line, int column, - const std::string& message) {} + virtual void AddWarning(const std::string& /* filename */, int /* line */, int /* column */, + const std::string& /* message */) {} private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MultiFileErrorCollector); diff --git a/src/google/protobuf/io/printer.h b/src/google/protobuf/io/printer.h index 64336ebcefed..904b81818bb0 100644 --- a/src/google/protobuf/io/printer.h +++ b/src/google/protobuf/io/printer.h @@ -65,7 +65,7 @@ class PROTOBUF_EXPORT AnnotationCollector { // TODO(gerbens) I don't see why we need virtuals here. Just a vector of // range, payload pairs stored in a context should suffice. - virtual void AddAnnotationNew(Annotation& a) {} + virtual void AddAnnotationNew(Annotation& /* a */) {} virtual ~AnnotationCollector() {} }; diff --git a/src/google/protobuf/io/tokenizer.h b/src/google/protobuf/io/tokenizer.h index 551516ea3970..3be00f11eacc 100644 --- a/src/google/protobuf/io/tokenizer.h +++ b/src/google/protobuf/io/tokenizer.h @@ -78,8 +78,8 @@ class PROTOBUF_EXPORT ErrorCollector { // Indicates that there was a warning in the input at the given line and // column numbers. The numbers are zero-based, so you may want to add // 1 to each before printing them. - virtual void AddWarning(int line, ColumnNumber column, - const std::string& message) {} + virtual void AddWarning(int /* line */, ColumnNumber /* column */, + const std::string& /* message */) {} private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ErrorCollector);