linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* New compiler warning in 2.6.34-rc1: 'start_ext.ee_block' may be used uninitialized
@ 2010-03-15 14:42 Stefan Richter
  2010-03-15 15:41 ` tytso
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Richter @ 2010-03-15 14:42 UTC (permalink / raw)
  To: Theodore Ts'o, Akira Fujita; +Cc: linux-ext4

Hi,

I saw the following scroll by during kernel compilation:

fs/ext4/move_extent.c: In function 'mext_leaf_block':

fs/ext4/move_extent.c:478: warning: 'start_ext.ee_block' may be used
uninitialized in this function


Is it real?  It seems that the initial start_ext.ee_len = 0 guards
against accidental use of an uninitialized start_ext.ee_block, but maybe
I missed something.

The message is from gcc (Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4 here.
-- 
Stefan Richter
-=====-==-=- --== -====
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: New compiler warning in 2.6.34-rc1: 'start_ext.ee_block' may be used uninitialized
  2010-03-15 14:42 New compiler warning in 2.6.34-rc1: 'start_ext.ee_block' may be used uninitialized Stefan Richter
@ 2010-03-15 15:41 ` tytso
  2010-03-25  2:42   ` Akira Fujita
  0 siblings, 1 reply; 3+ messages in thread
From: tytso @ 2010-03-15 15:41 UTC (permalink / raw)
  To: Stefan Richter; +Cc: Akira Fujita, linux-ext4

On Mon, Mar 15, 2010 at 03:42:39PM +0100, Stefan Richter wrote:
> Hi,
> 
> I saw the following scroll by during kernel compilation:
> 
> fs/ext4/move_extent.c: In function 'mext_leaf_block':
> 
> fs/ext4/move_extent.c:478: warning: 'start_ext.ee_block' may be used
> uninitialized in this function
> 
> Is it real?  It seems that the initial start_ext.ee_len = 0 guards
> against accidental use of an uninitialized start_ext.ee_block, but maybe
> I missed something.

>From my review of the code the fact that ee_len is set to zero should
make this be safe, but my preference would be to clear
start_ext.ee_block as well to prevent the warning from coming up
(since false positives clutter up warnings and might cause us to miss
a warning which isn't so benign).

Akira-san, do you agree that it is currently is safe?

	      	  	     	   - Ted

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: New compiler warning in 2.6.34-rc1: 'start_ext.ee_block' may be used uninitialized
  2010-03-15 15:41 ` tytso
@ 2010-03-25  2:42   ` Akira Fujita
  0 siblings, 0 replies; 3+ messages in thread
From: Akira Fujita @ 2010-03-25  2:42 UTC (permalink / raw)
  To: tytso; +Cc: Stefan Richter, linux-ext4


(2010/03/16 0:41), tytso@mit.edu wrote:
> On Mon, Mar 15, 2010 at 03:42:39PM +0100, Stefan Richter wrote:
>> Hi,
>>
>> I saw the following scroll by during kernel compilation:
>>
>> fs/ext4/move_extent.c: In function 'mext_leaf_block':
>>
>> fs/ext4/move_extent.c:478: warning: 'start_ext.ee_block' may be used
>> uninitialized in this function
>>
>> Is it real?  It seems that the initial start_ext.ee_len = 0 guards
>> against accidental use of an uninitialized start_ext.ee_block, but maybe
>> I missed something.
>
>> From my review of the code the fact that ee_len is set to zero should
> make this be safe, but my preference would be to clear
> start_ext.ee_block as well to prevent the warning from coming up
> (since false positives clutter up warnings and might cause us to miss
> a warning which isn't so benign).
>
> Akira-san, do you agree that it is currently is safe?
>

Sorry for the late reply.

The patch (gcc-wall-cleanup-in-move_extent.c) in ext4 patch queue
looks good to me.

Thanks,
Akira Fujita

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-25  2:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-15 14:42 New compiler warning in 2.6.34-rc1: 'start_ext.ee_block' may be used uninitialized Stefan Richter
2010-03-15 15:41 ` tytso
2010-03-25  2:42   ` Akira Fujita

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).