Skip to content

Commit

Permalink
Fix -Wunused-parameter in java_names.h (#8601)
Browse files Browse the repository at this point in the history
* Fix -Wunused-parameter in java_names.h

* Apply review comments
  • Loading branch information
georgthegreat committed May 11, 2021
1 parent f807c02 commit ca7f54a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/google/protobuf/compiler/java/java_helpers.h
Expand Up @@ -155,6 +155,7 @@ std::string GetOneofStoredType(const FieldDescriptor* field);
// Whether we should generate multiple java files for messages.
inline bool MultipleJavaFiles(const FileDescriptor* descriptor,
bool immutable) {
(void) immutable;
return descriptor->options().java_multiple_files();
}

Expand Down Expand Up @@ -244,15 +245,15 @@ bool IsDefaultValueJavaDefault(const FieldDescriptor* field);
bool IsByteStringWithCustomDefaultValue(const FieldDescriptor* field);

// Does this message class have descriptor and reflection methods?
inline bool HasDescriptorMethods(const Descriptor* descriptor,
inline bool HasDescriptorMethods(const Descriptor* /* descriptor */,
bool enforce_lite) {
return !enforce_lite;
}
inline bool HasDescriptorMethods(const EnumDescriptor* descriptor,
inline bool HasDescriptorMethods(const EnumDescriptor* /* descriptor */,
bool enforce_lite) {
return !enforce_lite;
}
inline bool HasDescriptorMethods(const FileDescriptor* descriptor,
inline bool HasDescriptorMethods(const FileDescriptor* /* descriptor */,
bool enforce_lite) {
return !enforce_lite;
}
Expand Down

0 comments on commit ca7f54a

Please sign in to comment.