Re: [PATCH] building libtraceevent with clang
From: Steven Rostedt
Date: Mon Feb 13 2017 - 12:14:28 EST
On Mon, 13 Feb 2017 13:26:22 -0300
Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> > diff --git a/tools/lib/traceevent/kbuffer-parse.c b/tools/lib/traceevent/kbuffer-parse.c
> > index 65984f1c2974..2009cb7d9675 100644
> > --- a/tools/lib/traceevent/kbuffer-parse.c
> > +++ b/tools/lib/traceevent/kbuffer-parse.c
> > @@ -315,6 +315,7 @@ static unsigned int old_update_pointers(struct kbuffer *kbuf)
> > extend += delta;
> > delta = extend;
> > ptr += 4;
> > + lenght = 0;
>
> ouch, 'length' :-)
>
> clang provides a really nice error message:
>
> kbuffer-parse.c:318:3: error: use of undeclared identifier 'lenght'; did you mean 'length'?
> lenght = 0;
> ^~~~~~
> length
> kbuffer-parse.c:297:15: note: 'length' declared here
> unsigned int length;
> ^
> 1 error generated.
>
> I only had to test compile it :-)
>
> > break;
> >
> > case OLD_RINGBUF_TYPE_TIME_STAMP:
> >
OK, I pulled the patch into git, and made it official ;-)
I also fixed the "lenght" in the change log too.
Could you use this instead.
-- Steve