Re: [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formattingin previous email)

From: Hugh Dickins
Date: Mon Nov 09 2009 - 10:54:22 EST


On Mon, 9 Nov 2009, askb wrote:
> On Mon, 2009-11-09 at 10:51 +0000, Hugh Dickins wrote:
> > On Wed, 4 Nov 2009, askb wrote:
> > > On Wed, 2009-11-04 at 10:57 +0100, walter harms wrote:
> > > > askb schrieb:
> > > > > Found the compiler warning on linux-next:
> > > > >
> > > > > mm/ksm.c: In function âksm_scan_threadâ:
> > > > > mm/ksm.c:1083: warning: âpage2[0u]â may be used uninitialized in this
> > > > > function
> > > > > mm/ksm.c:1083: note: âpage2[0u]â was declared here
...
> > Which version of the compiler gave you that uninitialized warning?
>
> gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux)

Thanks: funny, that's the one I've been using most too.

>
> > A version which lots of people are using, or just some snapshot?
> > I've never seen a warning there myself, but they do keep "refining"
> > that logic.
> >
> I got the warning while doing "make randconfig". However, now after a
> cleanup and redoing the same, the warning is not seen.

I just tried the most obvious alternatives (CC_OPTIMIZE_FOR_SIZE,
OPTIMIZE_INLINING, off and on), but still didn't see the warning.

Never mind, I've shoved a NULL in my tree, but no rush for this.

Hugh