Kenton Varda wrote:
> I don't think GCC generates this warning with -Wall and -Werror alone.
>  Maybe this is the result of -pedantic?  (Someone else on your team said you
> use that flag).  I'll be happy to make this change but you might want to
> consider disabling -pedantic when compiling .pb.cc files.  Otherwise, future
> changes may once again cause problems for you.

Yes, we are using -pedantic as well.

Best wishes,
Mats Kindahl

> 
> On Thu, Sep 4, 2008 at 10:29 AM, Mats Kindahl <[EMAIL PROTECTED]> wrote:
> 
>> Hi!
>>
>> When building Drizzle, we use -Wall and -Werror, which causes some warnings
>> in
>> code generated by protobuf to abort the build. The patch below eliminates
>> the
>> problem by adding the call to the default constructor.
>>
>> Just my few cents,
>> Mats Kindahl
>>
>> ----------------------------------------------------------
>> diff -r 70188e371c05 src/google/protobuf/compiler/cpp/cpp_message.cc
>> --- a/src/google/protobuf/compiler/cpp/cpp_message.cc   Thu Sep 04 15:09:20
>> 2008
>> +0200
>> +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc   Thu Sep 04 19:04:27
>> 2008
>> +0200
>> @@ -721,7 +721,8 @@ GenerateInitializerList(io::Printer* pri
>>   }
>>
>>   printer->Print(
>> -    "_cached_size_(0)");
>> +    "$base_class$(), _cached_size_(0)",
>> +    "base_class", "::google::protobuf::Message");
>>
>>   // Write the initializers for each field.
>>   for (int i = 0; i < descriptor_->field_count(); i++) {
>>
>> >>
>>
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
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