On Thu, 01 May 2008 13:16, Matthew Wilcox wrote: > On Thu, May 01, 2008 at 08:06:52PM +0100, Ricardo Martins wrote: > > This is my first patch for the Linux kernel. It fixes the following > > warnings given by gcc 4.3.0 about uninitialzed entities in mmap.c: > > First, it's generally a bad idea to fix these warnings. They sometimes > obscure real bugs. I see. > > I'd appreciate some feedback. > > > * x: (no) no x: (no) yes x: (no) yes x: (yes) yes > > - * > > + * > > Don't mix whitespace changes with other changes. Ok, it won't happen again. > > - struct vm_area_struct *vma, *prev; > > + struct vm_area_struct *vma, *prev = NULL; > > gcc bug -- it's failing to notice that find_vma_prepare() will always > initialise pprev. > > > - struct rb_node **rb_link, *rb_parent; > > + struct rb_node **rb_link = NULL, *rb_parent = NULL; > > Likewise. Hmm, that crossed my mind and I thought it was weird that gcc was complaining about it. > The other changes in your patch are either whitespace or fixes for the > same gcc problem. Thanks for your feedback; it was very helpful, since I'm a C newbie. Regards, -- Ricardo Martins * scarybox.net * GPG key: 0x1308F1B4
Attachment:
pgpQl06Q95MMH.pgp
Description: PGP signature