Status: New
Owner: ken...@google.com
Labels: Type-Defect Priority-Medium
New issue 202 by Oliver.Jowett: RepeatedField<Element>::MoveArray
generates "warning: declaration of 'size' shadows a member of 'this'"
http://code.google.com/p/protobuf/issues/detail?id=202
Seen when compiling code generated by protobuf 2.3.0 on a Redhat AS4 x86-32
machine (with gcc version 3.4.6 20060404 (Red Hat 3.4.6-10))
g++ -I/tmp/signalware-backends.1029644216.tmp/signalware-backends -isystem
/usr/local/omni/sp5_n/include -isystem /usr/local/protobuf/2.3.0/include
-D_REENTRANT -DNDEBUG -g -Wall -Wundef -Wshadow -Wpointer-arith
-Wwrite-strings -Wcast-align -Wcast-qual -Werror -Wno-non-virtual-dtor
-fno-exceptions -fno-rtti -fno-strict-aliasing -O2
-I/usr/local/omni/sp5_n/streams/include -m32 -DLINUX -DUSE_MALLINFO
-pthread -c generic.pb.cc -o
/tmp/signalware-backends.1029644216.tmp/signalware-backends/build/common/protocol/generic.pb.o
/usr/local/protobuf/2.3.0/include/google/protobuf/repeated_field.h: In
member function `void
google::protobuf::RepeatedField<Element>::MoveArray(Element*, Element*,
int) [with Element = google::protobuf::uint32]':
/usr/local/protobuf/2.3.0/include/google/protobuf/repeated_field.h:583:
instantiated from `void
google::protobuf::RepeatedField<Element>::Reserve(int) [with Element =
google::protobuf::uint32]'
/usr/local/protobuf/2.3.0/include/google/protobuf/repeated_field.h:476:
instantiated from `void google::protobuf::RepeatedField<Element>::Add(const
Element&) [with Element = google::protobuf::uint32]'
/usr/local/protobuf/2.3.0/include/google/protobuf/wire_format_lite_inl.h:251:
instantiated
from `static bool
google::protobuf::internal::WireFormatLite::ReadRepeatedFixedSizePrimitive(int,
google::protobuf::uint32, google::protobuf::io::CodedInputStream*,
google::protobuf::RepeatedField<T>*) [with CType =
google::protobuf::uint32,
google::protobuf::internal::WireFormatLite::FieldType DeclaredType =
TYPE_FIXED32]'
/usr/local/protobuf/2.3.0/include/google/protobuf/wire_format_lite_inl.h:303:
instantiated
from here
/usr/local/protobuf/2.3.0/include/google/protobuf/repeated_field.h:597:
warning: declaration of 'size' shadows a member of 'this'
Annoyingly these warnings are generated even though the protobuf headers
are included with -isystem, and our build fails because -Werror is used.
Under 2.2.0 these warnings don't occur.
--
You received this message because you are subscribed to the Google Groups "Protocol
Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.