grub-devel
[Top][All Lists]
Advanced

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

Re: Build break (uninitialized variable)


From: Grégoire Sutre
Subject: Re: Build break (uninitialized variable)
Date: Sun, 05 Feb 2012 01:31:07 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111114 Iceowl/1.0b2 Icedove/3.1.16

On 02/04/2012 11:31 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
On 03.02.2012 19:26, Grégoire Sutre wrote:
The compiler complains about `totsize' being possibly uninitialized
in grub-core/disk/diskfilter.c, function grub_diskfilter_make_raid().
I get this error with gcc 4.5.3 on NetBSD, and also with gcc 4.6.2 on
Debian GNU/Linux.

I'm not familiar with that code. The attached patch fixes this by
returning NULL when the argument `level' has an unexpected value.

I've looked at other code and seen that return NULL will result in the
skipping of those devices altogether, exactly what we want. So I think
it's a reasonable behaviour for this function. So go ahead

I've committed the patch.  Thanks for looking into this.

Grégoire



reply via email to

[Prev in Thread] Current Thread [Next in Thread]