Re: [PATCH 1/1] mmap: fix uninitialized entities warnings.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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'd appreciate some feedback.

>   *		x: (no) no	x: (no) yes	x: (no) yes	x: (yes) yes
> - *		
> + *

Don't mix whitespace changes with other changes.

> -	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.

The other changes in your patch are either whitespace or fixes for the
same gcc problem.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux