Re: [PATCH] TRACING: Fix a copmile warning

From: Steven Rostedt
Date: Mon Jul 25 2011 - 20:14:32 EST


On Mon, 2011-07-25 at 19:52 -0400, Arnaud Lacombe wrote:
> Hi,
>
> On Mon, Jul 25, 2011 at 7:49 PM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> > On Mon, 2011-07-25 at 18:38 -0400, Arnaud Lacombe wrote:
> >> Hi,
> >>
> >> On Mon, Jul 25, 2011 at 4:19 PM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> >> > On Mon, 2011-07-25 at 15:43 -0400, Arnaud Lacombe wrote:
> >> >
> >> >> Actually, we have a special uninitialized_var(x) macro to handle such
> >> >> false positive. From include/linux/compiler-gcc.h:
> >> >>
> >> >> /*
> >> >> * A trick to suppress uninitialized variable warning without generating any
> >> >> * code
> >> >> */
> >> >> #define uninitialized_var(x) x = x
> >> >
> >> > I'm aware of that too, but I think that is inappropriate as well. As I
> >> > said, some versions of gcc report it, others don't. Seems that gcc 4.6.0
> >> > says this is an error where 4.5.1 does not (I just tried both).
> >> >
> >> did you ? gcc 4.5.1 from Fedora 14 definitively shows the warning:
> >
> > Heh, I didn't use Fedora's version. I wonder if they added a patch or
> > built it differently. I built my own 4.5.1 as well as my own 4.6.0.
> >
> I'd assume you're building with -O2, the warning only shows up at -Os,
> see my previous mail.

No I had CONFIG_CC_OPTIMIZE_FOR_SIZE=y (which should do the -Os). I
could also compile with V=1 but I'm in the middle of other things at the
moment.

But I just realized you are doing i386, while I'm compiling with x86_64.
That could also be the difference.

Anyway, I'll look at what it produces and see if this is a bug or not.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/