From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Rtq0l-0001nR-C5 for mharc-grub-devel@gnu.org; Sat, 04 Feb 2012 19:31:19 -0500 Received: from eggs.gnu.org ([140.186.70.92]:35791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rtq0g-0001nL-BB for grub-devel@gnu.org; Sat, 04 Feb 2012 19:31:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rtq0b-0000Zf-Q7 for grub-devel@gnu.org; Sat, 04 Feb 2012 19:31:14 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:38930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rtq0b-0000Zb-LB for grub-devel@gnu.org; Sat, 04 Feb 2012 19:31:09 -0500 Received: by wibhj13 with SMTP id hj13so4860498wib.0 for ; Sat, 04 Feb 2012 16:31:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=p2vRVOgssxfY8eVdxBCjKsNFszxRqVu5rSNVsJvKKjM=; b=a2qDP/wLBhtYDmDjQ5vW3yzc122a1ghXlKiWSxL0yDqJsmQ8KkW3I/JvVNoq6EtnyL xP2ji8t17J7729UiwBkfuaNk6OkxWpXpISf5vfbotdjrefSLkCj851+r6o8Ne2qydMYT G+f7MhDTMbvw5P3CcSGTiJajIfARpjv9eJiR0= Received: by 10.181.11.231 with SMTP id el7mr6073160wid.0.1328401868200; Sat, 04 Feb 2012 16:31:08 -0800 (PST) Received: from [192.168.1.37] (c2433-1-88-160-112-182.fbx.proxad.net. [88.160.112.182]) by mx.google.com with ESMTPS id ho4sm15904368wib.3.2012.02.04.16.31.07 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Feb 2012 16:31:07 -0800 (PST) Message-ID: <4F2DCDCB.2030305@gmail.com> Date: Sun, 05 Feb 2012 01:31:07 +0100 From: =?UTF-8?B?R3LDqWdvaXJlIFN1dHJl?= 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 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: Build break (uninitialized variable) References: <4F2C26C3.6050804@gmail.com> <4F2DB1D5.8070200@gmail.com> In-Reply-To: <4F2DB1D5.8070200@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.212.169 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2012 00:31:18 -0000 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