Status: New
Owner: [email protected]
Labels: Type-Defect Priority-Medium

New issue 365 by [email protected]: Unused parameters in repeated_field.h cause build errors when using clang if -Werror -Wall is enabled
http://code.google.com/p/protobuf/issues/detail?id=365

What steps will reproduce the problem?
1. Create any program which includes google/protobuf/repeated_field.h
2. Attempt to compile said program with Apple clang version 3.0 (tags/Apple/clang-211.12) (based on LLVM 3.0svn)

What is the expected output? What do you see instead?
The program to compile, provided the sources are correct. Instead I get:

/opt/local/include/google/protobuf/repeated_field.h:1197:54: error: unused parameter 'ignores_parameter' [-Werror,-Wunused-parameter]
  RepeatedFieldBackInsertIterator<T>& operator++(int ignores_parameter) {
                                                     ^
/opt/local/include/google/protobuf/repeated_field.h:1228:57: error: unused parameter 'ignores_parameter' [-Werror,-Wunused-parameter]
  RepeatedPtrFieldBackInsertIterator<T>& operator++(int ignores_parameter) {
                                                        ^
/opt/local/include/google/protobuf/repeated_field.h:1257:11: error: unused parameter 'ignores_parameter' [-Werror,-Wunused-parameter]
      int ignores_parameter) {


What version of the product are you using? On what operating system?
protobuf 2.4.1
OS X 10.7.2
Apple clang version 3.0 (tags/Apple/clang-211.12) (based on LLVM 3.0svn) (from XCode 4.2.1)

Please provide any additional information below.

https://groups.google.com/forum/#!topic/open-lighting/39Mj0KXlCIk was how I became aware of the issue. To work around it I've changed my autoconf macro to s/-I/-isystem / as suggested in Issue 172.

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to