Any word on this? It doesn't seem to be in 2.0.2. This is causing us
to commit patched generated files in Drizzle rather than being able to
have just the .proto files.

Thanks!

On Aug 26, 6:23 pm, "Kenton Varda" <[EMAIL PROTECTED]> wrote:
> Thanks.  I'll apply this after 2.0.1 release, which has been pending for
> some time blocked on some stupid issue that's out of my hands but should
> supposedly be resolved any time now.
>
> On Tue, Aug 26, 2008 at 8:42 AM, jaypipes <[EMAIL PROTECTED]> wrote:
>
> > Hi!
>
> > The C++ code generator has a small bug that produces code that
> > produces warnings on some compilers when the -pedantic flag is
> > enabled.  In particular, when an enum definition ends in a trailing
> > comma, a warning is thrown.  Here is a patch to fix the small bug.
> > Thanks,
>
> > Jay Pipes
> > MySQL/Sun
>
> > diff -u for /src/google/protobuf/compiler/cpp/cpp_enum.cc:
>
> > --- cpp_enum.cc 2008-08-26 10:57:59.000000000 -0400
> > +++ cpp_enum.cc.bak     2008-08-26 10:58:16.000000000 -0400
> > @@ -57,7 +57,14 @@
> >     vars["prefix"] = (descriptor_->containing_type() == NULL) ?
> >       "" : classname_ + "_";
>
> > -    printer->Print(vars, "$prefix$$name$ = $number$,\n");
> > +    const char* enum_output;
> > +    // A trailing comma is a pedantic warning on some C++ compilers
> > +    // and so we ensure that no trailing slash is present
> > +    if (i != (descriptor_->value_count() - 1))
> > +      enum_output = "$prefix$$name$ = $number$, \n";
> > +    else
> > +      enum_output = "$prefix$$name$ = $number$\n";
> > +    printer->Print(vars, enum_output);
>
> >     if (descriptor_->value(i)->number() < min_value->number()) {
> >       min_value = descriptor_->value(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