On Mon, Feb 18, 2013 at 12:11:37AM +0100, Mark Kettenis wrote:

> > Date: Sun, 17 Feb 2013 18:45:10 +0100
> > From: Otto Moerbeek <o...@drijf.net>
> > 
> > On Sun, Feb 17, 2013 at 03:59:41PM +0100, Franco Fichtner wrote:
> > 
> > > Hi all,
> > > 
> > > found this still lingering in my tree. Still trying to figure out
> > > the best workflow for sending patches. Not sure if this adheres
> > > to the standards.
> > > 
> > > Thanks,
> > > Franco
> > > ---
> > >  share/man/man3/tree.3 | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3
> > > index bb9a5b2..f4a410c 100644
> > > --- a/share/man/man3/tree.3
> > > +++ b/share/man/man3/tree.3
> > > @@ -499,7 +499,7 @@ intcmp(struct node *e1, struct node *e2)
> > >  }
> > >  
> > >  RB_HEAD(inttree, node) head = RB_INITIALIZER(&head);
> > > -RB_GENERATE(inttree, node, entry, intcmp)
> > > +RB_GENERATE(inttree, node, entry, intcmp);
> > >  
> > >  int testdata[] = {
> > >   20, 16, 17, 13, 3, 6, 1, 8, 2, 4, 10, 19, 5, 9, 12, 15, 18,
> > > -- 
> > 
> > I don't agree. RB_GENERATE creates a function definition, and those are
> > not followed by a semicolon. It would just create an empty declaration.
> 
> On the other hand adding the semicolon helps editors to auto-indent
> the code.

emacs does not seem to have problems without a smeicolon.... 

anyway, some complers (using specific options) will complain about this.
e.g.  gcc --pedantic:

x.c:18: warning: ISO C does not allow extra ';' outside of a function

        -Otto

Reply via email to