Re: [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formatting

Hugh Dickins
2009-11-09T15:54:00Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1227 bytes --]

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